[
https://issues.apache.org/jira/browse/CALCITE-4599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371496#comment-17371496
]
Julian Hyde commented on CALCITE-4599:
--------------------------------------
I haven’t given this a lot of thought, but it seems better to invest in getting
the new approach working - identify cases where the TVF output column is used
as a group key in aggregation - than building on something that is obsolete.
It’s the nature of adapters that they have to bridge differences between the
languages. Your approach is to try to pull SQL closer to Elasticsearch, which
is easier but not for the greater good.
But yes, I know writing the adapter is hard. A user-defined aggregate function
might be the way out here.
> 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.
> {code:java}
> select count as cc from t group by date_histogram(`@timestamp`, interval '5'
> minute){code}
> 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)