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

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

XMLWordPrintable

    • 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

      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.

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              rhn-support-wfink Wolf Fink
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: