Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13196

Greater than Where condition on secondary column in Primary key does not work when also filtering on primary column in primary key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.8.1
    • None
    • thin client
    • None
    • Windows 10

    • Docs Required, Release Notes Required

    Description

      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? 

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            aschreiber1 Andrew
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: