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

Add Quarter as part of valid floor units to push down to Druid.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.16.0
    • Fix Version/s: 1.17.0
    • Component/s: druid
    • Labels:
      None

      Description

      Current list of valid floor units that can be pushed as valid floor unit is missing Quarters, something that Druid can actually do.
      This is a performance bug.
      For instance query

       
      SELECT floor_year(`__time`), max(added), sum(variation)
      FROM druid_table_1
      

      Is currently planned as

       
      {"queryType":"scan","dataSource":"wikipedia","intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"virtualColumns":[{"type":"expression","name":"vc","expression":"\"__time\"","outputType":"LONG"}],"columns":["vc","added","variation"],"resultFormat":"compactedList"}
      

      And it can be optimized to

      {"queryType":"timeseries","dataSource":"wikipedia","descending":false,"granularity":"quarter","aggregations":[{"type":"doubleMax","name":"$f1","fieldName":"added"},{"type":"doubleSum","name":"$f2","fieldName":"variation"}],"intervals":["1900-01-01T00:00:00.000Z/3000-01-01T00:00:00.000Z"],"context":{"skipEmptyBuckets":true}}
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bslim slim bouguerra
                Reporter:
                bslim slim bouguerra
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: