Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-9727

Ickle query ignores an IN clause if there is only one value

    Details

    • Steps to Reproduce:
      Hide

      Use the remote-query quickstart
      Add two persons with a phone number like this:
      key=1, value=Person{id=1, name='Wolf', email='w@r', phones=[PhoneNumber

      {number='123', type=HOME}]}
      key=2, value=Person{id=2, name='Dieter', email='d@r', phones=[PhoneNumber{number='234', type=HOME}]}

      run the following queries:
      Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123')
      Found 1 matches:
      >> Person{id=1, name='Wolf', email='w@r', phones=[PhoneNumber{number='123', type=HOME}

      ]}
      — OK

      Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123', '999') AND name='Dieter'
      Found 0 matches:
      — OK

      Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123') AND name='Dieter'
      Found 1 matches:
      >> Person{id=2, name='Dieter', email='d@r', phones=[PhoneNumber

      {number='234', type=HOME}

      ]}
      ---- Wrong as it is not expected to find any

      Show
      Use the remote-query quickstart Add two persons with a phone number like this: key=1, value=Person{id=1, name='Wolf', email='w@r', phones=[PhoneNumber {number='123', type=HOME}]} key=2, value=Person{id=2, name='Dieter', email='d@r', phones= [PhoneNumber{number='234', type=HOME}] } run the following queries: Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123') Found 1 matches: >> Person{id=1, name='Wolf', email='w@r', phones=[PhoneNumber{number='123', type=HOME} ]} — OK Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123', '999') AND name='Dieter' Found 0 matches: — OK Enter an Ickle query string: from quickstart.Person p where p.phone.number IN ('123') AND name='Dieter' Found 1 matches: >> Person{id=2, name='Dieter', email='d@r', phones=[PhoneNumber {number='234', type=HOME} ]} ---- Wrong as it is not expected to find any

      Description

      If an Ickl query has an IN clause in combination with another condition the IN clause seems completely ignored if it has only one value.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gustavonalle Gustavo Fernandes
                  Reporter:
                  wdfink Wolf-Dieter Fink
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: