[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16351564#comment-16351564 ] Igor Zubchenok commented on CASSANDRA-10368: This does not work for me in Cassandra 3.11.1, I get error: `Non-primary key columns cannot be restricted in the SELECT statement used for materialized view creation (got restrictions on: amount)` {code:java} CREATE TABLE cc_transactions ( userid text, year int, month int, day int, id int, amount int, card text, status text, PRIMARY KEY ((userid, year), month, day, id) ); CREATE MATERIALIZED VIEW suspicious_transactions AS SELECT userid, year, month, day, id, amount, card, status FROM cc_transactions WHERE userid IS NOT NULL AND year IS NOT NULL AND month IS NOT NULL AND day IS NOT NULL AND id IS NOT NULL AND amount > 1000 PRIMARY KEY ((userid, year), month, day, id); InvalidRequest: Error from server: code=2200 [Invalid query] message="Non-primary key columns cannot be restricted in the SELECT statement used for materialized view creation (got restrictions on: amount)" {code} Is it a bug? > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL, Materialized Views >Reporter: Tyler Hobbs >Assignee: Jochen Niebuhr >Priority: Minor > Fix For: 3.10 > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15397751#comment-15397751 ] Tyler Hobbs commented on CASSANDRA-10368: - [~jniebuhr] with the current schedule, it should be included in a 3.10 release in roughly two months. > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Assignee: Jochen Niebuhr >Priority: Minor > Fix For: 3.10 > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15396850#comment-15396850 ] Jochen Niebuhr commented on CASSANDRA-10368: [~thobbs] glad to hear that, thanks for the merge. do you know when this will appear in a binary release and in the corresponding docker image? > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Assignee: Jochen Niebuhr >Priority: Minor > Fix For: 3.10 > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15394243#comment-15394243 ] Tyler Hobbs commented on CASSANDRA-10368: - Thanks! Your tests look good to me, so I've started a CI test run: ||branch||testall||dtest|| |[CASSANDRA-10368-trunk|https://github.com/thobbs/cassandra/tree/CASSANDRA-10368-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-10368-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/thobbs/job/thobbs-CASSANDRA-10368-trunk-dtest]| If the test results look good, I will commit this. > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Priority: Minor > Fix For: 3.x > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384570#comment-15384570 ] Jochen Niebuhr commented on CASSANDRA-10368: Thanks for the feedback [~thobbs]. I'll try to put some tests together tomorrow. I think i'll be able to write the normal tests about filtering on non primary columns, I'm not sure about the timestamp ones though, as I'm pretty new to using Cassandra. > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Priority: Minor > Fix For: 3.x > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15384525#comment-15384525 ] Tyler Hobbs commented on CASSANDRA-10368: - Hi [~jniebuhr], thanks for the patch! I've gone back over CASSANDRA-9664 and CASSANDRA-10261 to refresh my memory, and I think you are correct that this is all that we need to do. However, we do need to add a lot of tests before this can be merged. The best place to add new tests would be {{test/unit/org/apache/cassandra/cql3/ViewFilteringTest.java}}. Specifically, we want to test cases like the one in [this comment|https://issues.apache.org/jira/browse/CASSANDRA-9664?focusedCommentId=14724150=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14724150] where we could have potential timestamp issues. You could also use a couple of test cases in {{test/unit/org/apache/cassandra/cql3/ViewTest.java}} as examples: {{complexTimestampUpdateTest}}, {{testRegularColumnTimestampUpdates}}, and {{testOldTimestamps}}. Let me know if you need assistance with this. > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Priority: Minor > Fix For: 3.x > > Attachments: 10368-3.8.txt > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15126775#comment-15126775 ] Tyler Hobbs commented on CASSANDRA-10368: - Yes, but it's not high priority at the moment. > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Priority: Minor > Fix For: 3.x > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-10368) Support Restricting non-PK Cols in Materialized View Select Statements
[ https://issues.apache.org/jira/browse/CASSANDRA-10368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15122565#comment-15122565 ] Jack Krupansky commented on CASSANDRA-10368: I just stumbled on this issue as kind of a loose end. Is there any intent to support this feature any time soon, assuming that the implementation is not a big deal? > Support Restricting non-PK Cols in Materialized View Select Statements > -- > > Key: CASSANDRA-10368 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10368 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Tyler Hobbs >Priority: Minor > Fix For: 3.x > > > CASSANDRA-9664 allows materialized views to restrict primary key columns in > the select statement. Due to CASSANDRA-10261, the patch did not include > support for restricting non-PK columns. Now that the timestamp issue has > been resolved, we can add support for this. -- This message was sent by Atlassian JIRA (v6.3.4#6332)