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

HANA translator: boolean column is not valid boolean expression in HANA

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 9.0, 8.12.5
    • 8.12.5
    • Misc. Connectors
    • None

    Description

      SAP HANA does not take boolean column or literal as boolean expressions.
      Query like this won't pass (invoked on HANA directly):

      SELECT (CASE WHEN BooleanValue THEN 'a' ELSE 'b' END) FROM BQT1.smalla;
      

      The following could serve as workaround (invoked on HANA directly):

      SELECT (CASE WHEN BooleanValue=true THEN 'a' ELSE 'b' END) FROM BQT1.smalla;
      

      The problem is observable when using boolean column in string function (invoked on Teiid):

      SELECT INTKEY, ('test+' || (BOOLEANVALUE || '+test')) FROM BQT1.SmallA ORDER BY IntKey
      

      Which results in following error:

      TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 HanaSource: 257 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT g_0."INTKEY" AS c_0, concat('test+', concat(CASE WHEN g_0."BOOLEANVALUE" THEN 'true' WHEN not(g_0."BOOLEANVALUE") THEN 'false' END, '+test')) AS c_1 FROM "BQT1"."SMALLA" AS g_0 ORDER BY c_0]
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: