[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17612490#comment-17612490 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 10/4/22 6:50 AM: branches 3.0 [https://github.com/instaclustr/cassandra/tree/cassandra-3.0] 3.11 [https://github.com/instaclustr/cassandra/tree/cassandra-3.11] 4.0 [https://github.com/instaclustr/cassandra/tree/cassandra-4.0] 4.1[https://github.com/instaclustr/cassandra/tree/cassandra-4.1] trunk [https://github.com/instaclustr/cassandra/tree/trunk] builds 3.0 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1965/] 3.11 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1966/] 4.0 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1967/] 4.1 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1969/] trunk [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1971/] was (Author: smiklosovic): branches 3.0 [https://github.com/instaclustr/cassandra/tree/cassandra-3.0] 3.11 [https://github.com/instaclustr/cassandra/tree/cassandra-3.11] 4.0 [https://github.com/instaclustr/cassandra/tree/cassandra-4.0] 4.1[https://github.com/instaclustr/cassandra/tree/cassandra-4.1] trunk [https://github.com/instaclustr/cassandra/tree/trunk] builds 3.0 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1965/] 3.11 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1966/] 4.0 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1967/] 4.1 [https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1969/] trunk https://ci-cassandra.apache.org/view/patches/job/Cassandra-devbranch/1971/] > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610828#comment-17610828 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/29/22 6:57 AM: Great stuff. gc_grace_seconds should not be allowed to be set either (mentioned in my last comment). I added it there, it is currently building in circle. I ll let you know. btw this needs to be applied from 3.0 included, would you mind to prepare all branches? was (Author: smiklosovic): Great stuff. gc_grace_seconds should not be allowed to be set either (mentioned in my last comment). I added it there, it is currently building in circle. I ll let you know. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610828#comment-17610828 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/29/22 6:43 AM: Great stuff. gc_grace_seconds should not be allowed to be set either (mentioned in my last comment). I added it there, it is currently building in circle. I ll let you know. was (Author: smiklosovic): Great stuff. gc_grace_seconds should not be allowed to be set as well (mentioned in my last comment). I added it there, it is currently building in circle. I ll let you know. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610354#comment-17610354 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/28/22 5:41 AM: Thanks [~bschoeni] for the patch. I tried it and the issues I ran into were: 1) it stopped to work when the primary key was composite, if primary key was just a simple column, "(mycolumn)", it autocompleted "WITH". But as soon as the key was "((col1), col2)" and I wanted to autocomplete "WITH CLUSTERING ORDER BY (col2 DESC);" it did not offer "WITH". 2) I was expecting that it will offer me all properties which I can use for regular tables. For example, "WITH comment = 'this is my view'" or any other property for that matter. For 2), this is where I am not completely sure if we are doing the right thing. Are mv allowed to go wild with other properties? Like you can have one gc_grace_seconds for base table but other for a mv? What does that mean in practice? Or compression, compaction and so on ... that's why I asked [~brandon.williams] if this makes sense to add into mv too. was (Author: smiklosovic): Thanks [~bschoeni] for the patch. I tried it and the issues I ran into were: 1) it stopped to work when the primary key was composite, if primary key was just a simple column, "(mycolumn)", it autocompleted "WITH". But as soon as the key was "((col1), col2)" and I wanted to autocomplete "WITH CLUSTERING ORDER BY (col2 DESC);" it did not offer "WITH". 2) I was expecting that it will offer me all properties which I can use for regular tables. For example, "WITH comment = 'this is my view'" or any other property for that matter. For 2), this is where I am not completely sure if we are doing the right thing. Are mv allowed to go wild with other properties? Like you can have one gc_grace_seconds for base table but other from mv? What does that mean in practice? Or compression, compaction and so on ... that's why I asked [~brandon.williams] if this makes sense to add into mv too. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17610354#comment-17610354 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/28/22 5:40 AM: Thanks [~bschoeni] for the patch. I tried it and the issues I ran into were: 1) it stopped to work when the primary key was composite, if primary key was just a simple column, "(mycolumn)", it autocompleted "WITH". But as soon as the key was "((col1), col2)" and I wanted to autocomplete "WITH CLUSTERING ORDER BY (col2 DESC);" it did not offer "WITH". 2) I was expecting that it will offer me all properties which I can use for regular tables. For example, "WITH comment = 'this is my view'" or any other property for that matter. For 2), this is where I am not completely sure if we are doing the right thing. Are mv allowed to go wild with other properties? Like you can have one gc_grace_seconds for base table but other from mv? What does that mean in practice? Or compression, compaction and so on ... that's why I asked [~brandon.williams] if this makes sense to add into mv too. was (Author: smiklosovic): Thanks [~bschoeni] for the patch. I tried it and the issues I ran into were: 1) it stopped to work when the primary key was composite, if primary key was just a simple column, "(mycolumn)", it autocompleted "WITH". But as soon as the key was "((col1), col2)" and I wanted to autocomplete "WITH CLUSTERING ORDER BY (col2 DESC);" it did not offered "WITH". 2) I was expecting that it will offer me all properties which I can use for regular tables. For example, "WITH comment = 'this is my view'" or any other property for that matter. For 2), this is where I am not completely sure if we are doing the right thing. Are mv allowed to go wild with other properties? Like you can have one gc_grace_seconds for base table but other from mv? What does that mean in practice? Or compression, compaction and so on ... that's why I asked [~brandon.williams] if this makes sense to add into mv too. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug > Components: CQL/Interpreter >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17608906#comment-17608906 ] Brad Schoening edited comment on CASSANDRA-17879 at 9/25/22 3:04 AM: - I'd assumed that user interaction with autocompletion would be hard to test, but I see its in test_cqlsh_completion.py. was (Author: bschoeni): I'll look to see if there are any existing tests for auto-completion. I'd assumed that user interaction would be had to test, but if there is something existing to be adapted, sure. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Assignee: Brad Schoening >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607765#comment-17607765 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/21/22 1:53 PM: I am not sure about the "column family" removal. First we should try to add it there without any changes. Then we can contemplate about the removal in the other ticket. However, to re-iterate once again, I do not think we are going to remove anything here, mostly for backward compatibility reasons. Could you please also check since where this issue is in? I think that materialized views were added around times of 3.6 or 3.8, not sure at all tbh. was (Author: smiklosovic): I am not sure about the "column family" removal. First we should try to add it there without any changes. Then we can contemplate about the removal in the other ticket. However, to re-iterate once again, I do not think we are going to remove anything here, mostly for backward compatibility reasons. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607765#comment-17607765 ] Stefan Miklosovic edited comment on CASSANDRA-17879 at 9/21/22 1:52 PM: I am not sure about the "column family" removal. First we should try to add it there without any changes. Then we can contemplate about the removal in the other ticket. However, to re-iterate once again, I do not think we are going to remove anything here, mostly for backward compatibility reasons. was (Author: smiklosovic): I am not sure about the "column family" removal. First we should try to add it there without any changes. Then we can contemplate about the removal in the other ticket. However, to re-iterate one again, I do not think we are going to remove anything here, mostly for backward compatibility reasons. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607445#comment-17607445 ] Brad Schoening edited comment on CASSANDRA-17879 at 9/21/22 1:23 AM: - In cql3handling.py, it uses this completer_for syntax with and without a decorator, for example: {code:java} @completer_for('createColumnFamilyStatement', 'wat') def create_cf_wat_completer(ctxt, cass): # would prefer to get rid of the "columnfamily" nomenclature in cql3 if ctxt.get_binding('partial', '') == '': return ['TABLE'] return ['TABLE', 'COLUMNFAMILY'] {code} {code:java} @completer_for('createColumnFamilyStatement', 'dot') def create_cf_ks_dot_completer(ctxt, cass): ks = dequote_name(ctxt.get_binding('ks')) if ks in cass.get_keyspace_names(): return ['.'] return [] {code} {code:java} completer_for('columnFamilyName', 'ksname')(cf_ks_name_completer) completer_for('materializedViewName', 'ksname')(cf_ks_name_completer) {code} but there doesn't appear to be one for createMaterializedView: {code:java} % grep completer_for cql3handling.py | grep create @completer_for('createKeyspaceStatement', 'wat') @completer_for('createColumnFamilyStatement', 'wat') @completer_for('createColumnFamilyStatement', 'dot') @completer_for('createIndexStatement', 'col') {code} It seems there is some cleanup and refactoring needed here to remove the obsolete columnfamily nomenclature before replicating this for createMaterializedView. I'm not really following the logic in the code here. was (Author: bschoeni): In cql3handling.py, it uses this completer_for syntax with and without a decorator, for example: {code:java} @completer_for('createColumnFamilyStatement', 'wat') def create_cf_wat_completer(ctxt, cass): # would prefer to get rid of the "columnfamily" nomenclature in cql3 if ctxt.get_binding('partial', '') == '': return ['TABLE'] return ['TABLE', 'COLUMNFAMILY'] {code} {code:java} @completer_for('createColumnFamilyStatement', 'dot') def create_cf_ks_dot_completer(ctxt, cass): ks = dequote_name(ctxt.get_binding('ks')) if ks in cass.get_keyspace_names(): return ['.'] return [] {code} {code:java} completer_for('columnFamilyName', 'ksname')(cf_ks_name_completer) completer_for('materializedViewName', 'ksname')(cf_ks_name_completer) {code} but there doesn't appear to be one for createMaterializedView: {code:java} % grep completer_for cql3handling.py | grep create @completer_for('createKeyspaceStatement', 'wat') @completer_for('createColumnFamilyStatement', 'wat') @completer_for('createColumnFamilyStatement', 'dot') @completer_for('createIndexStatement', 'col') {code} It seems there is some cleanup and refactoring needed here to remove the obsolete columnfamily nomenclature before replicating this for createMaterializedView. I'm not really following the logic in the code here. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17879) It is not possible to autocomplete "WITH" when creating materialized view
[ https://issues.apache.org/jira/browse/CASSANDRA-17879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17607445#comment-17607445 ] Brad Schoening edited comment on CASSANDRA-17879 at 9/21/22 1:23 AM: - In cql3handling.py, it uses this completer_for syntax with and without a decorator, for example: {code:java} @completer_for('createColumnFamilyStatement', 'wat') def create_cf_wat_completer(ctxt, cass): # would prefer to get rid of the "columnfamily" nomenclature in cql3 if ctxt.get_binding('partial', '') == '': return ['TABLE'] return ['TABLE', 'COLUMNFAMILY'] {code} {code:java} @completer_for('createColumnFamilyStatement', 'dot') def create_cf_ks_dot_completer(ctxt, cass): ks = dequote_name(ctxt.get_binding('ks')) if ks in cass.get_keyspace_names(): return ['.'] return [] {code} {code:java} completer_for('columnFamilyName', 'ksname')(cf_ks_name_completer) completer_for('materializedViewName', 'ksname')(cf_ks_name_completer) {code} but there doesn't appear to be one for createMaterializedView: {code:java} % grep completer_for cql3handling.py | grep create @completer_for('createKeyspaceStatement', 'wat') @completer_for('createColumnFamilyStatement', 'wat') @completer_for('createColumnFamilyStatement', 'dot') @completer_for('createIndexStatement', 'col') {code} It seems there is some cleanup and refactoring needed here to remove the obsolete columnfamily nomenclature before replicating this for createMaterializedView. I'm not really following the logic in the code here. was (Author: bschoeni): In cql3handling.py, it uses this @completer_for syntax, for example: {code:java} @completer_for('createColumnFamilyStatement', 'wat') def create_cf_wat_completer(ctxt, cass): # would prefer to get rid of the "columnfamily" nomenclature in cql3 if ctxt.get_binding('partial', '') == '': return ['TABLE'] return ['TABLE', 'COLUMNFAMILY'] {code} {code:java} @completer_for('createColumnFamilyStatement', 'dot') def create_cf_ks_dot_completer(ctxt, cass): ks = dequote_name(ctxt.get_binding('ks')) if ks in cass.get_keyspace_names(): return ['.'] return [] {code} but there doesn't appear to be one for createMaterializedView: {code:java} % grep completer_for cql3handling.py | grep create @completer_for('createKeyspaceStatement', 'wat') @completer_for('createColumnFamilyStatement', 'wat') @completer_for('createColumnFamilyStatement', 'dot') @completer_for('createIndexStatement', 'col') {code} It seems there is some cleanup and refactoring needed here to remove the obsolete columnfamily nomenclature before replicating this for createMaterializedView. > It is not possible to autocomplete "WITH" when creating materialized view > - > > Key: CASSANDRA-17879 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17879 > Project: Cassandra > Issue Type: Bug >Reporter: Stefan Miklosovic >Priority: Normal > > I noticed that when I type this: > {code} > CREATE MATERIALIZED VIEW ks.mv2 AS SELECT * FROM t WHERE k IS NOT NULL AND c1 > IS NOT NULL AND c2 IS NOT NULL PRIMARY KEY (c1,k,c2) > {code} > nothing happens after pressing tab, there should be options shown as for > table case. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org