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

Julian Hyde commented on CALCITE-1655:
--------------------------------------

IN and BETWEEN are not valid operators in the {{RexNode}} language. Hive has 
been sending calls to IN and BETWEEN to Calcite, bypassing the validation that 
happens when you go from SQL via SqlToRelConverter. If you want to create  
these calls within the Druid adapter I guess it won't do much harm, but if 
these {{RexNode}}s ever come into contact with the existing rules, bad things 
may happen. If that happens, you'll have to change the code in Hive that 
generates {{RexNode}}s. I don't see any point in supporting IN and BETWEEN in 
the wider Calcite code, because they are syntactic sugar.

I agree with [~jcamachorodriguez] that we need to see a unit test going from 
{{RexNode}} to Druid JSON.

> 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