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

Issue with concatenating null strings with OData translator

XMLWordPrintable

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

      There is a difference in behavior of CONCAT(x,y) function in Teiid SQL and the concat(x,y) filtering function in OData - the SQL function will return null if one of the arguments is null, but the OData function will return the non-null argument in this case.

      This leads to some peculiar behavior that for rows where A='10' and B=null, the query

      SELECT concat(A, B) = '10' 
      FROM BQT1.SmallA 
      WHERE concat(A, B) = '10';
      

      will return a row containing false, because the expression in the SELECT clause will be evaluated by Teiid, whereas the one in the WHERE clause will be evaluated by the OData concat function.

      This is against the documented behavior of Teiid's CONCAT function, because such row should not be returned at all.

              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: