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

JDBC adapter incorrectly pushes windowed aggregates down to HSQLDB

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.15.0
    • Fix Version/s: 1.17.0
    • Component/s: jdbc-adapter
    • Labels:
      None

      Description

      JDBC adapter incorrectly pushes windowed aggregates down to HSQLDB. Queries containing window functions fail when using HSQLDB (or any other DB that does not support window functions) because the optimizer converts them to native SQL with window functions which are not supported by HSQLDB. For example:

      select "store_id", "product_id", sum("unit_sales") unit_sales, row_number() over (
      partition by "store_id" order by sum("unit_sales") desc
      ) row_num
      from "sales_fact_1998"
      group by "store_id", "product_id"
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                Pavel Gubin Pavel Gubin
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: