[ https://issues.apache.org/jira/browse/CASSANDRA-12734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17404077#comment-17404077 ]
Ekaterina Dimitrova commented on CASSANDRA-12734: ------------------------------------------------- Zhao has created a patch applicable to 3.0 and 3.11 which I ported. ||[3.0|https://github.com/ekaterinadimitrova2/cassandra/pull/new/12734-3.0]||[3.11|https://github.com/ekaterinadimitrova2/cassandra/pull/new/12734-3.11]|| He also added two tests which I ported to [4.0|https://github.com/apache/cassandra/compare/trunk...ekaterinadimitrova2:12734-4.0?expand=1] where the issue was already fixed before but the new tests revealed issues not related to the issue we are trying to fix as part of this ticket. The tests showed 4.0 regression and change of behavior, not related to this issue though. 1) The clustering order is always ASC when we create a materialized view, even when we want it explicitly DESC. 2) While both 3.0 and 3.11 will produce the same [expectedViewSnapshot|https://github.com/apache/cassandra/compare/trunk...ekaterinadimitrova2:12734-3.11?expand=1#diff-41e29794572dd219fb3b5b15b0fccfe2d0b92f6eeb0b84a91b3ee22bacd83d61R740-R744], In 4.0 this will look in the following way: {code:java} CREATE MATERIALIZED VIEW IF NOT EXISTS %s.%s AS SELECT pk2, pk1, ck2, ck1, reg1, reg2 FROM %s.%s WHERE pk2 IS NOT NULL AND pk1 IS NOT NULL AND ck2 IS NOT NULL AND ck1 IS NOT NULL PRIMARY KEY ((pk2, pk1), ck2, ck1) WITH ID = %s AND CLUSTERING ORDER BY (ck2 ASC, ck1 ASC){code} Probably worth it to open separate ticket for Cassandra 4, the code was refactored there, instead of fixing everything as part of this one. CC [~blerer] as I know he was also looking into this ticket. > Materialized View schema file for snapshots created as tables > ------------------------------------------------------------- > > Key: CASSANDRA-12734 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12734 > Project: Cassandra > Issue Type: Bug > Components: Feature/Materialized Views, Legacy/Tools > Reporter: Hau Phan > Assignee: Ekaterina Dimitrova > Priority: Normal > Fix For: 3.0.x, 3.11.x, 4.0.x > > > The materialized view schema file that gets created and stored with the > sstables is created as a table instead of a materialized view. > Can the materialized view be created and added to the corresponding table's > schema file? -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org