You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/05/11 17:29:00 UTC

[jira] [Commented] (CALCITE-4599) Support push-down of "date histogram aggregation" in elastic search adapter

    [ https://issues.apache.org/jira/browse/CALCITE-4599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17342771#comment-17342771 ] 

Julian Hyde commented on CALCITE-4599:
--------------------------------------

Yes, Calcite should push down calls to the {{TUMBLE}} table function.

Also queryies that group by {{FLOOR(dateTime TO timeUnit)}} or {{CEIL(dateTime TO timeUnit)}} functions. (These are a little less powerful: they allow you to create a group every minute or every hour, but not every 5 minutes.)

> Support push-down of "date histogram aggregation" in elastic search adapter
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-4599
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4599
>             Project: Calcite
>          Issue Type: Improvement
>          Components: elasticsearch-adapter
>            Reporter: Jacky Yin
>            Priority: Critical
>
> "date histogram aggregation" is one of the most popular analysis function of elastic search. It is not pushed down to elastic search in current calcite es adapter. Is there any plan to support it? Given the below example, if it can be pushed down to es, the query should be very efficient. 
> "select count(*) as cc from t group by date_histogram(`@timestamp`, interval '5' minute)" 
> Another question is currently there seems no proper sql function/keyword for date_histogram.  One possible option is TUMBLE function. Is it right? 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)