Skip to content

Conversation

@adutra
Copy link
Contributor

@adutra adutra commented Sep 16, 2015

@adutra adutra force-pushed the java918 branch 2 times, most recently from cd768dd to a414a00 Compare September 17, 2015 16:30
sb.append(" ");
newLine(sb, formatted);
}
newLine(sb.append("WHERE ").append(whereClause).append(' '), formatted);
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@tolbertam
Copy link
Contributor

I added some tests for Accessors just to make sure the driver was able to properly map a @Table annotated pojo for a different able to a view, and also to exercise some basic MV functionality. Everything looks ready to me other than my comment about the where clause (which will probably be dependent on the response in CASSANDRA-9664). 👍. I am 👍 on merging this if no change is needed for that.


assertThat(mv.asCQLQuery(false)).contains(createMV);

//whereClause currently puts quoted identifiers around column names so this assertion would fail, see:
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@tolbertam tolbertam force-pushed the java918 branch 2 times, most recently from 9c0bace to c0d2098 Compare September 18, 2015 20:01
iamaleksey added a commit that referenced this pull request Sep 19, 2015
JAVA-918: Allow MV's select statements to be more complex.
@iamaleksey iamaleksey merged commit 093a692 into 3.0 Sep 19, 2015
@tolbertam tolbertam deleted the java918 branch February 10, 2016 16:50
Sfurti-yb pushed a commit to yugabyte/cassandra-java-driver that referenced this pull request Dec 8, 2023
…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>
Sfurti-yb pushed a commit to yugabyte/cassandra-java-driver that referenced this pull request Dec 8, 2023
Update Javadoc.

[apache#456]

Signed-off-by: Mark Paluch <mpaluch@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants