[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127000#comment-15127000 ] Alex Petrov commented on CASSANDRA-10715: - It seems that the 2.2.3 error "Unsupported null value for indexed column" is not correct, as `mainGuy` isn't indexed. On current master, it'd throw the same exact exception if the column `mainGuy` is indexed. If the column isn't indexed and the table is empty, query simple returns 0 results. In case there were any results, assertion is triggered so query fails: ``` CREATE TABLE foo (k1 int, k2 int, v1 int, v2 int, PRIMARY KEY ((k1, k2), v1)); > SELECT * FROM foo where v2 = null ALLOW FILTERING; k1 | k2 | v1 | v2 +++ > insert into foo (k1,k2,v1,v2) values (1,1,1,1); > select * from foo where v2 = null allow filtering; Traceback (most recent call last): File "./bin/cqlsh.py", line 1249, in perform_simple_statement result = future.result() File "/Users/ifesdjeen/foss/java/cassandra/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cluster.py", line 3122, in result raise self._final_exception ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation failed - received 0 responses and 1 failures" info={'failures': 1, 'received_responses': 0, 'required_responses': 1, 'consistency': 'ONE'} ``` If I understand the issue correctly, there's just no validation for query, therefore it fails during the iteration process. For example, `ColumnCondition` used for LWT supports null values for EQ/NEQ. `Operator` logic might be reused for the both cases. > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > > oThis is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] >
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15136781#comment-15136781 ] Benjamin Lerer commented on CASSANDRA-10715: There are 2 problems with the query: # filtering is only supported for index queries # restricting by {{null}} is not supported The first point will be addressed by CASSANDRA-6377. I compared the {{2.2}} release and the {{3.0}} and it seems that some validation has been removed by mistake. At the same time the error message thrown by {{2.2}} is clearly wrong as the column is not indexed. By consequence, {{2.2}} will need to be fixed too. [~ifesdjeen] Thanks for your patch.The CASSANDRA-8099 refactoring has modified the backend to support filtering (as a preparation work for CASSANDRA-6377). Nevertheless, none of the current index implementation support {{null}} values within restrictions and I am not sure that the serialization mechanism, used between the nodes, support it. > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterato
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139655#comment-15139655 ] Alex Petrov commented on CASSANDRA-10715: - [~blerer] thanks for the investigation! I wasn't sure which of the two behaviours was the right one and picked the wrong one, unfortunately. Should I prepare the patch {{2.2}} and {{3.0}} to address your comments and ensure validations are in place and some tests for this cases to avoid removing them in future or are you already on it / it is going to be fixed in combination with mentioned tickets? > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:128) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apach
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140506#comment-15140506 ] Benjamin Lerer commented on CASSANDRA-10715: [~ifesdjeen] Thanks for the proposal. Unfortunatly, this ticket is a bit more tricky than it looks. I found multiple problems: # one regression in 2.2 where filtering is not supported anymore for thrift static column families # several misleading error messages in 2.2 and 3.0+ # some regression in 3.0 for null values validations # some undocumented behavior for 3.0+ and I have not yet tested all the possible options. It seems that we clearly lack of testing in the filtering area and I would like to solve that problem within the scope of that ticket. > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136) > ~[apache-cassandra-3.0.0.jar:3.0
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140507#comment-15140507 ] Alex Petrov commented on CASSANDRA-10715: - Great! Thanks for the response! -- Alex > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:128) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:123) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:288) > ~[apache-cassandra-3.0.0.jar:3.0.
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140528#comment-15140528 ] Benjamin Lerer commented on CASSANDRA-10715: [~ifesdjeen] I realized that my answer could be interpreted in different ways. Sorry for that. The problem with that ticket is to check the behavior of filtering for all (or at least most of) the possible combination of options. Determining if the behavior is correct or not (which is not always clear even for me) and fixing it if it is not. By consequence, I prefer to work on it myself. Just wanted to be sure that you did not misunderstand me. > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:128) > ~[apach
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140643#comment-15140643 ] Alex Petrov commented on CASSANDRA-10715: - Sure! That's what I understood, too. -- Alex > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.build(ReadResponse.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:128) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse$LocalDataResponse.(ReadResponse.java:123) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadResponse.createDataResponse(ReadResponse.java:65) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.ReadCommand.createResponse(ReadCommand.java:288) > ~[apache-cassandra-3.0.0.jar:
[jira] [Commented] (CASSANDRA-10715) Filtering on NULL returns ReadFailure exception
[ https://issues.apache.org/jira/browse/CASSANDRA-10715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15147432#comment-15147432 ] Benjamin Lerer commented on CASSANDRA-10715: CASSANDRA-6377 will allow filtering for non index queries but will not allow filtering on {{NULL}}. It makes sense to support filtering on null value as C* already support it for conditions. In SQL, it is not possible to test for {{NULL}} values with comparison operators, such as =, <, or <>. For testing {{NULL}} values the {{IS NULL}} and {{IS NOT NULL}} operators must be used instead. In MVs definitions, C* already support the {{IS NOT NULL}} operator. In conditions, {{=}} and {{!=}} operators are supported with {{NULL}}. This difference in syntax is a bit confusing. Ideally, the {{IS NULL}} operator should be equivalent to = {{NULL}} and {{IS NOT NULL}} should be equivalent to != {{NULL}}. > Filtering on NULL returns ReadFailure exception > --- > > Key: CASSANDRA-10715 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10715 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: C* 3.0.0 | cqlsh | C# driver 3.0.0beta2 | Windows 2012 R2 >Reporter: Kishan Karunaratne >Assignee: Benjamin Lerer > Attachments: > 0001-Allow-null-values-in-filtered-searches-reuse-Operato.patch > > > This is an issue I first noticed through the C# driver, but I was able to > repro on cqlsh, leading me to believe this is a Cassandra bug. > Given the following schema: > {noformat} > CREATE TABLE "TestKeySpace_4928dc892922"."coolMovies" ( > unique_movie_title text, > movie_maker text, > director text, > list list, > "mainGuy" text, > "yearMade" int, > PRIMARY KEY ((unique_movie_title, movie_maker), director) > ) WITH CLUSTERING ORDER BY (director ASC) > {noformat} > Executing a SELECT with FILTERING on a non-PK column, using a NULL as the > argument: > {noformat} > SELECT "mainGuy", "movie_maker", "unique_movie_title", "list", "director", > "yearMade" FROM "coolMovies" WHERE "mainGuy" = null ALLOW FILTERING > {noformat} > returns a ReadFailure exception: > {noformat} > cqlsh:TestKeySpace_4c8f2cf8d5cc> SELECT "mainGuy", "movie_maker", > "unique_movie_title", "list", "director", "yearMade" FROM "coolMovies" WHERE > "mainGuy" = null ALLOW FILTERING; > ←[0;1;31mTraceback (most recent call last): > File "C:\Users\Kishan\.ccm\repository\3.0.0\bin\\cqlsh.py", line 1216, in > perform_simple_statement > result = future.result() > File > "C:\Users\Kishan\.ccm\repository\3.0.0\bin\..\lib\cassandra-driver-internal-only-3.0.0a3.post0-3f15725.zip\cassandra-driver-3.0.0a3.post0-3f15725\cassandra\cluster.py", > line 3118, in result > raise self._final_exception > ReadFailure: code=1300 [Replica(s) failed to execute read] message="Operation > failed - received 0 responses and 1 failures" info={'failures': 1, > 'received_responses': 0, 'required_responses': 1, 'cons > istency': 'ONE'} > ←[0m > {noformat} > Cassandra log shows: > {noformat} > WARN [SharedPool-Worker-2] 2015-11-16 13:51:00,259 > AbstractTracingAwareExecutorService.java:169 - Uncaught exception on thread > Thread[SharedPool-Worker-2,10,main]: {} > java.lang.AssertionError: null > at > org.apache.cassandra.db.filter.RowFilter$SimpleExpression.isSatisfiedBy(RowFilter.java:581) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToRow(RowFilter.java:243) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BaseRows.applyOne(BaseRows.java:95) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at org.apache.cassandra.db.transform.BaseRows.add(BaseRows.java:86) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.UnfilteredRows.add(UnfilteredRows.java:21) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.add(Transformation.java:136) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.Transformation.apply(Transformation.java:102) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:233) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.filter.RowFilter$CQLFilter$1IsSatisfiedFilter.applyToPartition(RowFilter.java:227) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.transform.BasePartitions.hasNext(BasePartitions.java:76) > ~[apache-cassandra-3.0.0.jar:3.0.0] > at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$Serializer.serialize(UnfilteredPartitionIterators.java:293) > ~[apache-cassan