slim bouguerra created CALCITE-2222:
---------------------------------------
Summary: Add Quarter as part of valid floor units to push down to
Druid.
Key: CALCITE-2222
URL: https://issues.apache.org/jira/browse/CALCITE-2222
Project: Calcite
Issue Type: Bug
Components: druid
Affects Versions: 1.16.0
Reporter: slim bouguerra
Assignee: slim bouguerra
Fix For: 1.17.0
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
{code}
SELECT floor_year(`__time`), max(added), sum(variation)
FROM druid_table_1
{code}
Is currently planned as
{code}
{"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"}
{code}
And it can be optimized to
{code}
{"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}}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)