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 2016/08/31 22:13:20 UTC
[jira] [Comment Edited] (CALCITE-1358) Push filters on time
dimension to Druid
[ https://issues.apache.org/jira/browse/CALCITE-1358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15453535#comment-15453535 ]
Julian Hyde edited comment on CALCITE-1358 at 8/31/16 10:13 PM:
----------------------------------------------------------------
bq. In addition, HIVE-14217 adds support for the recognition of Druid default granularity functions in Group By clause.
[~jcamachorodriguez], What syntax did you use for this? We have the {{FLOOR(dateTime TO timeUnit)}} function in Calcite (it's non standard but quite I believe other DBs have it, and we lean heavily on it in streaming queries) and you can use this to group in minute granularity:
{code}
select productId, count(*)
from Orders
group by floor(orderTime to minute), productId
{code}
Would {{floor}} solve your use-case?
was (Author: julianhyde):
bq. In addition, HIVE-14217 adds support for the recognition of Druid default granularity functions in Group By clause.
[~jcamachorodriguez], What syntax did you use for this? We have the {{FLOOR(dateTime TO timeUnit)}} function in Calcite (it's non standard but quite I believe other DBs have it, and we lean heavily on it in streaming queries) and you can use this to group in minute granularity:
{code}
select productId, count\(*)
from Orders
group by floor(orderTime to minute), productId
{code}
Would {{floor}} solve your use-case?
> Push filters on time dimension to Druid
> ---------------------------------------
>
> Key: CALCITE-1358
> URL: https://issues.apache.org/jira/browse/CALCITE-1358
> Project: Calcite
> Issue Type: Bug
> Components: druid
> Affects Versions: 1.9.0
> Reporter: Jesus Camacho Rodriguez
> Assignee: Jesus Camacho Rodriguez
>
> Porting work done in HIVE-14217.
> Logic should split the filter conditions into two parts: those predicates referred to the time dimension, and predicates referred to other columns.
> Then, the predicates on the time dimension should be translated into Druid intervals, possibly consolidating those ranges e.g. to detect overlapping. The other predicates will go into the Druid filter field.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)