-
Notifications
You must be signed in to change notification settings - Fork 887
JAVA-918: Allow MV's select statements to be more complex. #456
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
Conversation
cd768dd to
a414a00
Compare
| sb.append(" "); | ||
| newLine(sb, formatted); | ||
| } | ||
| newLine(sb.append("WHERE ").append(whereClause).append(' '), formatted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are where clauses required? The cql grammar seems to allow you to create MVs without it, but cassandra doesn't allow it. It also seems that previously you could create MVs without it (for example from this blog post but that could be outdated). If they are not required we should have some criteria here to omit this if the whereClause is empty or null.
I posted a question on CASSANDRA-9664.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got an explanation that for now the where clause will be required, but it does seem possible in the future that this could be optional, so I think it would still be good to handle this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a test for missing WHERE clauses to be on the safe side.
|
I added some tests for Accessors just to make sure the driver was able to properly map a |
|
|
||
| assertThat(mv.asCQLQuery(false)).contains(createMV); | ||
|
|
||
| //whereClause currently puts quoted identifiers around column names so this assertion would fail, see: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be uncomment or removed based on the response in CASSANDRA-9664.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-enabled the assertion, knowing that it will probably fail until Sylvain's suggestion is implemented.
9c0bace to
c0d2098
Compare
JAVA-918: Allow MV's select statements to be more complex.
…fication. We now throw the correct exception type according to the spec. [resolves apache#456][r2dbc/r2dbc-spi#184] Signed-off-by: Mark Paluch <mpaluch@vmware.com>
Update Javadoc. [apache#456] Signed-off-by: Mark Paluch <mpaluch@vmware.com>
See https://issues.apache.org/jira/browse/CASSANDRA-9664 for details.
Working branch:
https://github.com/thobbs/cassandra/tree/CASSANDRA-9664-rebase-3