Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursors are not supported on a table which has a clustered columnstore index #262

Open
jbgess opened this issue Feb 21, 2023 · 1 comment
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@jbgess
Copy link

jbgess commented Feb 21, 2023

Versions

  • r2dbc-mssql version: 0.9.0-RELEASE
  • Java: openjdk-17 1.13

Issue

Cannot get data from a table with a columnstore index when using MssqlConnectionFactory.

When trying to execute a query I am getting the error:
Cursors are not supported on a table which has a clustered columnstore index.; nested exception is io.r2dbc.mssql.ExceptionFactory$MssqlNonTransientException: [35370] [S0001] Cursors are not supported on a table which has a clustered columnstore index.

The query I am trying to execute has this structure:
SELECT TOP 1000 * FROM <table_name> ORDER BY <date_field> DESC

The queries are being executed using spring-r2dbc DatabaseClient (v5.3.22) with a MssqlConnectionFactory.

What I have tried

Setting the option preferCursoredExecution to use direct. Which I believe it should be using by default. To set the property I have tried the few different approaches suggested in the documentation. e.g.:

  • ConnectionFactoryOptions
  • MssqlConnectionConfiguration.builder()

Setting the options value with boolean vs Predicate<String>.

Connecting to the database directly and changing the selectMethod between cursor and direct. When using direct the data is returned successfully. When using cursor I get the exception as expected.

@mp911de
Copy link
Member

mp911de commented Jul 4, 2023

With #267 we removed another code path that might have led to cursor usage. Care to update to the newest version and retry with your custom Predicate?

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants