Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5275

OData4 translator doesn't handle IS NOT NULL condition properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 10.0.4, 10.2, 10.1.2
    • 8.12.11.6_4
    • OData
    • None

      Given that BQT1.SmallA is a view backed by Odata4 translator, both of these queries fail:

      SELECT intnum FROM BQT1.SmallA WHERE intnum IS NOT NULL
      SELECT intnum FROM BQT1.SmallA WHERE NOT(intnum IS NULL)
      

      The problem is that this is translated to a OData request like this:

      http://localhost:8080/odata4/csv/bqt1/SmallA?%24select=intnum&%24filter=not(intnum%20eq%20null)
      

      This request fails with:

      The property 'not', used in a query expression, is not defined in type 'csv.1.bqt1.SmallA'.
      

      A working URL which would return the correct rows would be:

      http://localhost:8080/odata4/csv/bqt1/SmallA?%24select=intnum&%24filter=intnum%20ne%20null
      

              rhn-engineering-shawkins Steven Hawkins
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: