[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Shuler updated CASSANDRA-13174: --- Fix Version/s: (was: 3.11.x) (was: 4.x) 3.11.0 4.0 > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: Legacy/CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer >Priority: Normal > Fix For: 3.11.0, 4.0 > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Hanna updated CASSANDRA-13174: - Component/s: (was: Materialized Views) > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - Unca
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeremy Hanna updated CASSANDRA-13174: - Component/s: Materialized Views > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL, Materialized Views > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:1
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13174: --- Resolution: Fixed Status: Resolved (was: Ready to Commit) Committed into 3.11 at 6487876dde14c46d5753f972909e5acec854cb53 and merged into trunk > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-13174: Status: Ready to Commit (was: Patch Available) > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - U
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13174: --- Reviewer: Tyler Hobbs > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13174: --- Status: Patch Available (was: Open) > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - Uncaug
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13174: --- Component/s: CQL > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thre
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13174: --- Fix Version/s: 4.x 3.11.x > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.10 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Fix For: 3.11.x, 4.x > > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kishan Karunaratne updated CASSANDRA-13174: --- Description: Looks like secondary indexing is allowed on duration type columns. Since comparisons are not possible for the duration type, indexing on it also should be invalid. 1) {noformat} CREATE TABLE duration_table (k int PRIMARY KEY, d duration); INSERT INTO duration_table (k, d) VALUES (0, 1s); SELECT * from duration_table WHERE d=1s ALLOW FILTERING; {noformat} The above throws an error: {noformat} WARN [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: java.lang.UnsupportedOperationException at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) [main/:na] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [main/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] Caused by: java.lang.UnsupportedOperationException: null at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) ~[main/:na] at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na] at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) ~[main/:na] at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) ~[main/:na] at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) ~[main/:na] at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na] at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na] at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) ~[main/:na] at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) ~[main/:na] ... 5 common frames omitted {noformat} 2) Similarly, if an index is created on the duration column: {noformat} CREATE INDEX d_index ON simplex.duration_table (d); SELECT * from duration_table WHERE d=1s; {noformat} results in: {noformat} WARN [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The secondary index 'd_index' is not yet available at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSession
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kishan Karunaratne updated CASSANDRA-13174: --- Description: Looks like secondary indexing is allowed on duration type columns. Since comparisons are not possible for the duration type, indexing on it also should be invalid. 1) {noformat} CREATE TABLE duration_table (k int PRIMARY KEY, d duration); INSERT INTO duration_table (k, d) VALUES (0, 1s); SELECT * from duration_table WHERE d=1s ALLOW FILTERING; {noformat} The above throws an error: {noformat} WARN [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: java.lang.UnsupportedOperationException at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) [main/:na] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [main/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] Caused by: java.lang.UnsupportedOperationException: null at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) ~[main/:na] at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na] at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) ~[main/:na] at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) ~[main/:na] at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) ~[main/:na] at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na] at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na] at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) ~[main/:na] at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) ~[main/:na] ... 5 common frames omitted {noformat} 2) Similarly, if an index is created on the duration column: {noformat} CREATE INDEX d_index ON simplex.duration_table (d); SELECT * from duration_table WHERE d=1s; {noformat} results in: {noformat} WARN [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The secondary index 'd_index' is not yet available at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSession
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kishan Karunaratne updated CASSANDRA-13174: --- Reproduced In: 3.10 > Indexing is allowed on Duration type when it should not be > -- > > Key: CASSANDRA-13174 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13174 > Project: Cassandra > Issue Type: Bug > Environment: C* 3.10 >Reporter: Kishan Karunaratne > > Looks like secondary indexing is allowed on duration type columns. Since > comparisons are not possible for the duration type, indexing on it also > should be invalid. > 1) > {noformat} > CREATE TABLE simplex.duration_table (k int PRIMARY KEY, d duration); > INSERT INTO duration_table (k, d) VALUES (0, 1s); > SELECT * from duration_table WHERE d=1s ALLOW FILTERING; > {noformat} > The above throws an error: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:09:57,821 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: java.lang.UnsupportedOperationException > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) > ~[main/:na] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > ~[na:1.8.0_91] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) > ~[main/:na] > at > org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) > [main/:na] > at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) > [main/:na] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] > Caused by: java.lang.UnsupportedOperationException: null > at > org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) > ~[main/:na] > at > org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) > ~[main/:na] > at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) > ~[main/:na] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) > ~[main/:na] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) > ~[main/:na] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) > ~[main/:na] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) > ~[main/:na] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) > ~[main/:na] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) > ~[main/:na] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) > ~[main/:na] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) > ~[main/:na] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) > ~[main/:na] > at > org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) > ~[main/:na] > ... 5 common frames omitted > {noformat} > 2) > Similarly, if an index is created on the duration column: > {noformat} > CREATE INDEX d_index ON simplex.duration_table (d); > SELECT * from duration_table WHERE d=1s; > {noformat} > results in: > {noformat} > WARN [ReadStage-2] 2017-01-31 17:12:00,623 > AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread > Thread[ReadStage-2,10,main]: {} > java.lang.RuntimeException: > org.apache.c
[jira] [Updated] (CASSANDRA-13174) Indexing is allowed on Duration type when it should not be
[ https://issues.apache.org/jira/browse/CASSANDRA-13174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kishan Karunaratne updated CASSANDRA-13174: --- Description: Looks like secondary indexing is allowed on duration type columns. Since comparisons are not possible for the duration type, indexing on it also should be invalid. 1) {noformat} CREATE TABLE simplex.duration_table (k int PRIMARY KEY, d duration); INSERT INTO duration_table (k, d) VALUES (0, 1s); SELECT * from duration_table WHERE d=1s ALLOW FILTERING; {noformat} The above throws an error: {noformat} WARN [ReadStage-2] 2017-01-31 17:09:57,821 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: java.lang.UnsupportedOperationException at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134) [main/:na] at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109) [main/:na] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91] Caused by: java.lang.UnsupportedOperationException: null at org.apache.cassandra.db.marshal.AbstractType.compareCustom(AbstractType.java:174) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compare(AbstractType.java:160) ~[main/:na] at org.apache.cassandra.db.marshal.AbstractType.compareForCQL(AbstractType.java:204) ~[main/:na] at org.apache.cassandra.cql3.Operator.isSatisfiedBy(Operator.java:201) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:719) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:324) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:120) ~[main/:na] at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:110) ~[main/:na] at org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:44) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.add(Transformation.java:174) ~[main/:na] at org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:140) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:307) ~[main/:na] at org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:292) ~[main/:na] at org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:96) ~[main/:na] at org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:310) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:145) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:138) ~[main/:na] at org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:134) ~[main/:na] at org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:76) ~[main/:na] at org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:333) ~[main/:na] at org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:1884) ~[main/:na] at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2587) ~[main/:na] ... 5 common frames omitted {noformat} 2) Similarly, if an index is created on the duration column: {noformat} CREATE INDEX d_index ON simplex.duration_table (d); SELECT * from duration_table WHERE d=1s; {noformat} results in: {noformat} WARN [ReadStage-2] 2017-01-31 17:12:00,623 AbstractLocalAwareExecutorService.java:167 - Uncaught exception on thread Thread[ReadStage-2,10,main]: {} java.lang.RuntimeException: org.apache.cassandra.index.IndexNotAvailableException: The secondary index 'd_index' is not yet available at org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:2591) ~[main/:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_91] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162) ~[main/:na] at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$Loca