Andrew created IGNITE-13196:

             Summary: Greater than Where condition on secondary column in 
Primary key does not work when also filtering on primary column in primary key
                 Key: IGNITE-13196
             Project: Ignite
          Issue Type: Bug
          Components: thin client
    Affects Versions: 2.8.1
         Environment: Windows 10
            Reporter: Andrew

Using the Java Thin Client when I try to use the SQL API, I have an issue where 
I am unable to query by both columns in a composite primary key when one of 
those conditions is a greater than condition.


For example if I create a table: "Create Table If Not Exists test (foo varchar, 
bar int, biz int, PRIMARY KEY( foo, bar))

And then insert the following data: INSERT INTO test VALUES ('key1', 1, 2), 
('key2', 2, 3 )


The following queries return the same result (('key2', 2, 3)):

"Select * from test where foo = 'key2'"

"Select * from test where bar > 1"


However the following query returns no data:

"Select * from test where foo = 'key2' and bar > 1"


For reference each query is executed using: igniteClient.query( new 
SqlFieldsQuery( Query) ).getAll()

Could you help explain why this is happening and if there are any workarounds? 


This message was sent by Atlassian Jira

Reply via email to