Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5270

JDBC adapter should not generate FILTER (WHERE) in Firebolt dialect

    XMLWordPrintableJSON

Details

    Description

      JDBC adapter should not generate FILTER (WHERE) in the Firebolt dialect, because Firebolt does not support filter clauses in aggregate functions. For example, COUNT(*) FILTER (WHERE a = 2)  throws 

      Invalid operation error: SQL query not valid.
      SQL query:
      ==========
      SELECT COUNT FILTER (WHERE a = 2) FROM <table>
                          ^=== ERROR HERE!
      ==========
       

      The fix is for supportsAggregateFunctionFilter to return false. The dialect implementation should override the supportsAggregateFunctionFilter method it currently inherits from the  base SqlDialect class.

      See Firebolt SQL reference.

      Attachments

        Issue Links

          Activity

            People

              tjbanghart TJ Banghart
              tjbanghart TJ Banghart
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m