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

HANA MIN and MAX functions not applicable on boolean

    Details

    • Steps to Reproduce:
      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
    • Workaround Description:
      1. Explicitly cast the boolean values to TINYINT
    • Bugzilla Update:
      Perform

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shawkins Steven Hawkins
                  Reporter:
                  jstastny Jan Stastny
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: