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

Jesus Camacho Rodriguez commented on CALCITE-1655:
--------------------------------------------------

Whether we go into Calcite with IN/BETWEEN clauses, or we generate them via 
converter before generating the Druid JSON query, we need this fix, so I would 
suggest we check it in.

Concerning the IN/BETWEEN integration, it goes beyond the scope of the Druid 
adapter. As it is mentioned above, _Hive has been sending calls to IN and 
BETWEEN to Calcite_, which maybe it is preventing some optimizations from 
kicking in; we need to explore that.
{quote}
My suggestion is write a converter from RexNode that contains only (AND, OR, =, 
<=, etc.) to one that also includes scalar-IN and BETWEEN.
{quote}
In Hive, we already have such converter rule for IN clause, not for BETWEEN 
though. We are also missing the piece that would decompose IN/BETWEEN clauses 
into AND, OR, =, <=, etc.

> Add In filter to druid adapter.
> -------------------------------
>
>                 Key: CALCITE-1655
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1655
>             Project: Calcite
>          Issue Type: Bug
>          Components: druid
>            Reporter: slim bouguerra
>            Assignee: Julian Hyde
>
> The druid calcite adapter throw an exception when an IN filter is used.
> This happens only in hive because in calcite project the IN filter is 
> transformed to OR automatically. 
> Since this rule does not kick in HIVE and it is better to use the native IN 
> filter from druid instead having huge number of OR clauses i will send a 
> patch that adds the IN filter.  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to