[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15230915#comment-15230915 ] Alex Petrov edited comment on CASSANDRA-11310 at 4/7/16 7:32 PM: - And the test results: |[utest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11310-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11310-trunk-dtest/]| was (Author: ifesdjeen): And the test results: |[testall|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11310-trunk-testall/]|[dtest|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11310-trunk-dtest/]| > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15223225#comment-15223225 ] Alex Petrov edited comment on CASSANDRA-11310 at 4/3/16 11:45 AM: -- I've found one problem. It turns out that the restrictions I specified were a bit too strict and under several scenarios (for example, when PK is restricted with EQ and there are two slices, although both slices have same first column) were involving filtering even though they shouldn't have. One other scenario was handled incorrectly because the position counter was never updated. With Frozen collection tests - it's just missed cases that previously were disallowed. I've pushed (unsquashed to make it easier to trace changes) commits here: https://github.com/ifesdjeen/cassandra/commits/11310-trunk was (Author: ifesdjeen): I've found one problem. It turns out that the restrictions I specified were a bit too strict and under several scenarios (for example, when PK is restricted with EQ and there are two slices, although both slices have same first column) were involving filtering even though they shouldn't have. One other scenario was handled incorrectly because the position counter was never updated. With Frozen collection tests - it's just missed cases that previously were disallowed. I've pushed (unsquashed to make it easier to trace changes) commits here: https://github.com/ifesdjeen/cassandra/commits/11310-trunk > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15202782#comment-15202782 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/21/16 11:10 AM: --- I've tried to get it all sorted out and have handled most of the things by now, although some cases are harder to handle without larger changes. For example, within the {{StatementRestrictions}} we can't know whether there {{ClusteringColumnRestrictions}} would require filtering. One of the cases is multiple column slices, when clustering columns are given in the correct order. Without seeing actual restrictions (which are private to the {{PrimaryKeyRestrictionSet}}), we can't assert that there is more than one slice. For example, there's a custom logic related to filtering contained within in the {{RestrictionSet}}, such as {{hasMultipleContains}}. I think it will be simpler to handle on top of your branch: https://github.com/blerer/cassandra/commits/11354-trunk, since there it's going to be possible to add logic related to the clustering columns within the clustering columns class. To give a bit of background, I've consolidated {{usesFiltering}} and exposed it via (previously existed) {{StatementRestrictions::needFiltering}}, and made sure that both {{usesFiltering}} and {{usesSecondaryIndexing}} are correctly and consistently set. For the last bit, it'd be good to know whether clustering column restrictions require filtering, as described above. Do you think it's a good idea? was (Author: ifesdjeen): I've tried to get it all sorted out and have handled most of the things by now, although some cases are harder to handle without larger changes. For example, within the {{StatementRestrictions}} we can't know whether there {{ClusteringColumnRestrictions}} would require filtering. One of the cases is multiple column slices, when clustering columns are given in the correct order. Without seeing actual restrictions (which are private to the {{PrimaryKeyRestrictionSet}}), we can't assert that there is more than one slice. For example, there's a custom logic related to filtering contained within in the {{RestrictionSet}}, such as {{hasMultipleContains}}. I think it will be simpler to handle on top of your branch: https://github.com/blerer/cassandra/commits/11354-trunk, since there it's going to be possible to add logic related to the clustering columns within the clustering columns class. Do you think it's a good idea? > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15195464#comment-15195464 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/16/16 9:30 PM: -- That totally makes sense. I've added tests for the {{CONTAINS}} restrictions on the frozen collections (list and map). Also, have addressed your other comments * renamed {{useFiltering}} to {{allowFiltering}}. I've sticked to the previously existing naming ({{useFiltering}} was already there, so I hesitated to change it at first) * renamed {{indexRestrictions}} to {{filteringRestrictions}} * addressed {{StatementRestriction}} comments by checking whether we're doing filtering and adding {{clusteringColumnsRestrictions}} to {{filteringRestrictions}}, removed changes to {{getRowFilter}} I have still pushed to the same branch: https://github.com/ifesdjeen/cassandra/compare/trunk...cassandra-11310 was (Author: ifesdjeen): That totally makes sense. I've added tests for the {{CONTAINS}} restrictions on the frozen collections (list and map). Also, have addressed your other comments * renamed {{useFiltering}} to {{allowFiltering}}. I've sticked to the previously existing naming ({{useFiltering}} was already there, so I hesitated to change it at first) * renamed {{indexRestrictions}} to {{filteringRestrictions}} * addressed {{StatementRestriction}} comments by checking whether we're doing filtering and adding {{clusteringColumnsRestrictions}} to {{filteringRestrictions}}, removed changes to {{getRowFilter}} I have still pushed to the same branch: https://github.com/ifesdjeen/cassandra/commit/991c28b7b7ad8debbccfa9faed1b012f2388c231 > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15202782#comment-15202782 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/19/16 2:11 PM: -- I've tried to get it all sorted out and have handled most of the things by now, although some cases are harder to handle without larger changes. For example, within the {{StatementRestrictions}} we can't know whether there {{ClusteringColumnRestrictions}} would require filtering. One of the cases is multiple column slices, when clustering columns are given in the correct order. Without seeing actual restrictions (which are private to the {{PrimaryKeyRestrictionSet}}), we can't assert that there is more than one slice. For example, there's a custom logic related to filtering contained within in the {{RestrictionSet}}, such as {{hasMultipleContains}}. I think it will be simpler to handle on top of your branch: https://github.com/blerer/cassandra/commits/11354-trunk, since there it's going to be possible to add logic related to the clustering columns within the clustering columns class. Do you think it's a good idea? was (Author: ifesdjeen): I've tried to get it all sorted out and have handled most of the things by now, although some cases are harder to handle without larger changes. For example, within the {{StatementRestrictions}} we can't know whether there {{ClusteringColumnRestrictions}} would require filtering. One of the cases is multiple column slices, when clustering columns are given in the correct order. Without seeing actual restrictions (which are private to the {{PrimaryKeyRestrictionSet}}), we can't assert that there is more than one slice. I think it will be simpler to handle on top of your branch: https://github.com/blerer/cassandra/commits/11354-trunk, since there it's going to be possible to add logic related to the clustering columns within the clustering columns class. Do you think it's a good idea? > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15195230#comment-15195230 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/15/16 12:49 PM: --- I'm making the changes you've listed, hope to have them ready shortly. About the {{CONTAINS}} restriction on the Clustering columns, I am most likely missing something, but at least so far the collection types aren't allowed to be a part of the primary key at all, even as a Clustering Column: {{Invalid collection type for PRIMARY KEY component b}} whenever {{b}} is a collection type. On the other half, it's not possible to use contains on non-collection types: {{Cannot use CONTAINS on non-collection column b}}. was (Author: ifesdjeen): I'm making the changes you've listed, hope to have them ready shortly. About the {{CONTAINS}} restriction on the Clustering columns, I am most likely missing something, but at least so far the collection types aren't allowed to be a part of the primary key at all, even as a Clustering Column: {{Invalid collection type for PRIMARY KEY component b}} whenever {{b}} is a collection type. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15189913#comment-15189913 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/13/16 1:59 PM: -- I've attached a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I've added the filtering for multicolumn slices, too: https://github.com/ifesdjeen/cassandra/commits/cassandra-11310 was (Author: ifesdjeen): I've attached a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15189913#comment-15189913 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/10/16 8:48 PM: -- I've attached a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. was (Author: ifesdjeen): Here's a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > Attachments: > 0001-Allow-filtering-on-clustering-columns-for-queries-wi.patch > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15189913#comment-15189913 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/10/16 8:48 PM: -- Here's a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding {{useFiltering}} to the {{PrimaryKeyRestrictionSet}}, although that'd require exposing {{Restrictions}} iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their {{SliceRestriction::addRowFilterTo}} is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. was (Author: ifesdjeen): Here's a very rough version, mostly to understand if it generally goes the right direction. I've tried to avoid adding `useFiltering` to the `PrimaryKeyRestrictionSet`, although that'd require exposing `Restrictions` iterator since the validations are different for queries that allow filtering. So I've left it "as-is" for now. Other than that - I've tried to cover several types of queries in tests. I'm still not sure if the handling of multi-columns is correct, since their `SliceRestriction::addRowFilterTo` is not permitted at the moment. {{CONAINS}} works as expected, too. I haven't yet ran / tried dtests, will do it hopefully tomorrow. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > Attachments: > 0001-Allow-filtering-on-clustering-columns-for-queries-wi.patch > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15187154#comment-15187154 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/9/16 2:31 PM: - I hope I'm not bugging you with questions too much. It looks like it all requires changes to {{MultiCBuilder}}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either {{buildBoundForSlice}} or {{buildBound}} is returned in {{PrimaryKeyRestrictionSet::boundsAsClustering}}. At least for the cases with slices over multiple columns, such as {{SELECT * FROM myTable WHERE b < 3 AND c <= 4}}. Thank you for your help. was (Author: ifesdjeen): I hope I'm not bugging you with questions too much. It looks like it all requires changes to {{MultiCBuilder}}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either {{buildBoundForSlice}} or {{buildBound}} is returned in {{PrimaryKeyRestrictionSet::boundsAsClustering}}. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15187154#comment-15187154 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/9/16 2:30 PM: - I hope I'm not bugging you with questions too much. It looks like it all requires changes to {MultiCBuilder}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. was (Author: ifesdjeen): I hope I'm not bugging you with questions too much. It looks like it all requires changes to `MultiCBuilder`, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15187154#comment-15187154 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/9/16 2:30 PM: - I hope I'm not bugging you with questions too much. It looks like it all requires changes to {{MultiCBuilder}}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either {{buildBoundForSlice}} or {{buildBound}} is returned in {{PrimaryKeyRestrictionSet::boundsAsClustering}}. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. was (Author: ifesdjeen): I hope I'm not bugging you with questions too much. It looks like it all requires changes to {{MultiCBuilder}}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11310) Allow filtering on clustering columns for queries without secondary indexes
[ https://issues.apache.org/jira/browse/CASSANDRA-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15187154#comment-15187154 ] Alex Petrov edited comment on CASSANDRA-11310 at 3/9/16 2:30 PM: - I hope I'm not bugging you with questions too much. It looks like it all requires changes to {{MultiCBuilder}}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. was (Author: ifesdjeen): I hope I'm not bugging you with questions too much. It looks like it all requires changes to {MultiCBuilder}, since at the moment only a single slice is allowed, and it always has to be the "last" one, as either `buildBoundForSlice` or `buildBound` is returned in `PrimaryKeyRestrictionSet::boundsAsClustering`. At least for the cases with slices over multiple columns, such as `SELECT * FROM myTable WHERE b < 3 AND c <= 4`. Thank you for your help. > Allow filtering on clustering columns for queries without secondary indexes > --- > > Key: CASSANDRA-11310 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11310 > Project: Cassandra > Issue Type: Improvement > Components: CQL >Reporter: Benjamin Lerer >Assignee: Alex Petrov > Labels: doc-impacting > Fix For: 3.x > > > Since CASSANDRA-6377 queries without index filtering non-primary key columns > are fully supported. > It makes sense to also support filtering on clustering-columns. > {code} > CREATE TABLE emp_table2 ( > empID int, > firstname text, > lastname text, > b_mon text, > b_day text, > b_yr text, > PRIMARY KEY (empID, b_yr, b_mon, b_day)); > SELECT b_mon,b_day,b_yr,firstname,lastname FROM emp_table2 > WHERE b_mon='oct' ALLOW FILTERING; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)