You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2018/04/03 01:58:00 UTC

[jira] [Resolved] (CALCITE-2222) Add Quarter as part of valid floor units to push down to Druid.

     [ https://issues.apache.org/jira/browse/CALCITE-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesus Camacho Rodriguez resolved CALCITE-2222.
----------------------------------------------
    Resolution: Fixed

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/09693abb .

> 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
>            Priority: Major
>             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)