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

HANA MIN and MAX functions not applicable on boolean

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.12.2, 8.13
    • 8.7.1.6_2
    • Misc. Connectors
    • None
    • Hide
      1. prepare a HANA table with BOOLEAN column (table=BQT1.SmallA, column=BooleanValue)
      2. connect to a vdb with HANA source
      3. run query SELECT MIN(true) FROM BQT1.SmallA
      4. run query SELECT MIN(BooleanValue) FROM BQT1.SmallA
      5. repeat the same for PostgreSQL if interested
      Show
      prepare a HANA table with BOOLEAN column (table=BQT1.SmallA, column=BooleanValue) connect to a vdb with HANA source run query SELECT MIN(true) FROM BQT1.SmallA run query SELECT MIN(BooleanValue) FROM BQT1.SmallA repeat the same for PostgreSQL if interested
      1. Explicitly cast the boolean values to TINYINT

    Description

      SAP HANA doesn't support MIN and MAX functions for BOOLEAN type.
      Compared to postgresql, which also has BOOLEAN data type, it seems inconsistent, as postgresql translator mimics MIN and MAX functions by translating them using PostgreSQL specific constructs:
      min(BooleanValue) as bool_and(BooleanValue)
      max(BooleanValue) as bool_or(BooleanValue)

      Similar issue is with CEILING and FLOOR functions.

      Attachments

        Issue Links

          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: