[
https://issues.apache.org/jira/browse/CASSANDRA-15180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
wu taiyin updated CASSANDRA-15180:
----------------------------------
Description:
I have a SASI scene and I am not sure if this is a problem.
I also create two SASI indexes for two column in one table, One column is int
type and one is text type.
When i use the query condition by these two index cloumn with ununequal
conditon , the result cannot be retrieved.
and the schema and query cql as follow :
1: create a table and SASI index for two column:
cassandra@cqlsh:app105> CREATE TABLE app105.complextestff(
... a int,
... b int,
... c int,
... d text,
... PRIMARY KEY (a,b)
... );
cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_c ON
app105.complextestff (c) USING 'org.apache.cassandra.index.sasi.SASIIndex';
cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_d ON
app105.complextestff (d) USING 'org.apache.cassandra.index.sasi.SASIIndex';
2: insert some data to this table
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,1,1,'1');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,2,1,'1');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,3,1,'2');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,4,1,'2');
cassandra@cqlsh:app105> select * from complextestff ;
a | b | c | d
---++------+---
1 | 1 | 1 | 1
1 | 2 | 1 | 1
1 | 3 | 1 | 2
1 | 4 | 1 | 2
3: query by condition. all the index column use "=" , and it can retrieve the
result succefully.
cassandra@cqlsh:app105> select * from complextestff WHERE a=1 and c=1;
a | b | c | d
---++------+---
1 | 1 | 1 | 1
1 | 2 | 1 | 1
1 | 3 | 1 | 2
1 | 4 | 1 | 2
4、but when i use the ">" operator to a index column which is text type , it
cant retrieve the result succefully
cassandra@cqlsh:app105> select * from complextestff WHER*{color:#FF0000}E a=1
and c=1 and d >= '1'{color}* ALLOW FILTERING;
a | b | c | d
---++------+---
(0 rows)
was:
I have a SASI scene and I am not sure if this is a problem.
I also create two SASI indexes for two column in one table, One column is int
type and one is text type.
When i use the query condition by these two index cloumn with ununequal
conditon , the result cannot be retrieved.
and the schema and query cql as follow :
1: create a table and SASI index for two column:
cassandra@cqlsh:app105> CREATE TABLE app105.complextestff(
... a int,
... b int,
... c int,
... d text,
... PRIMARY KEY (a,b)
... );
cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_c ON
app105.complextestff (c) USING 'org.apache.cassandra.index.sasi.SASIIndex';
cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_d ON
app105.complextestff (d) USING 'org.apache.cassandra.index.sasi.SASIIndex';
2: insert some data to this table
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,1,1,'1');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,2,1,'1');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,3,1,'2');
cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
1,4,1,'2');
cassandra@cqlsh:app105> select * from complextestff ;
a | b | c | d
---+---+---+---
1 | 1 | 1 | 1
1 | 2 | 1 | 1
1 | 3 | 1 | 2
1 | 4 | 1 | 2
3: query by condition. all the index column use "=" , and it can retrieve the
result succefully.
cassandra@cqlsh:app105> select * from complextestff WHERE a=1 and c=1;
a | b | c | d
---+---+---+---
1 | 1 | 1 | 1
1 | 2 | 1 | 1
1 | 3 | 1 | 2
1 | 4 | 1 | 2
4、but when i use the ">" operator to a index column which is text type , it
cant retrieve the result succefully
cassandra@cqlsh:app105> select * from complextestff WHERE a=1 and c=1 and d >=
'1' ALLOW FILTERING;
a | b | c | d
---+---+---+---
(0 rows)
> SASI: Cant retrieve the result when the condition is Mixed query condition
> when one conditon is "=" for a int type and other condition is ">" for a
> string type
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-15180
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15180
> Project: Cassandra
> Issue Type: Bug
> Reporter: wu taiyin
> Priority: Normal
>
> I have a SASI scene and I am not sure if this is a problem.
> I also create two SASI indexes for two column in one table, One column is
> int type and one is text type.
> When i use the query condition by these two index cloumn with ununequal
> conditon , the result cannot be retrieved.
> and the schema and query cql as follow :
> 1: create a table and SASI index for two column:
> cassandra@cqlsh:app105> CREATE TABLE app105.complextestff(
> ... a int,
> ... b int,
> ... c int,
> ... d text,
> ... PRIMARY KEY (a,b)
> ... );
> cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_c ON
> app105.complextestff (c) USING 'org.apache.cassandra.index.sasi.SASIIndex';
> cassandra@cqlsh:app105> CREATE CUSTOM INDEX sasi_105_findtest4_d ON
> app105.complextestff (d) USING 'org.apache.cassandra.index.sasi.SASIIndex';
> 2: insert some data to this table
> cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
> 1,1,1,'1');
> cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
> 1,2,1,'1');
> cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
> 1,3,1,'2');
> cassandra@cqlsh:app105> INSERT INTO complextestff(a , b , c , d ) VALUES (
> 1,4,1,'2');
> cassandra@cqlsh:app105> select * from complextestff ;
> a | b | c | d
> ---++------+---
> 1 | 1 | 1 | 1
> 1 | 2 | 1 | 1
> 1 | 3 | 1 | 2
> 1 | 4 | 1 | 2
> 3: query by condition. all the index column use "=" , and it can retrieve the
> result succefully.
> cassandra@cqlsh:app105> select * from complextestff WHERE a=1 and c=1;
> a | b | c | d
> ---++------+---
> 1 | 1 | 1 | 1
> 1 | 2 | 1 | 1
> 1 | 3 | 1 | 2
> 1 | 4 | 1 | 2
> 4、but when i use the ">" operator to a index column which is text type , it
> cant retrieve the result succefully
> cassandra@cqlsh:app105> select * from complextestff WHER*{color:#FF0000}E
> a=1 and c=1 and d >= '1'{color}* ALLOW FILTERING;
> a | b | c | d
> ---++------+---
> (0 rows)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]