[
https://issues.apache.org/jira/browse/CALCITE-1655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15885552#comment-15885552
]
Jesus Camacho Rodriguez commented on CALCITE-1655:
--------------------------------------------------
IN and BETWEEN are included in the _isValidFilter_ method in DruidQuery, that
is why we get this Exception: we push the Filter, but then we do not know how
to generate the JSON for its predicate. To avoid the Exception, we would either
need to 1) remove IN/BETWEEN from _isValidFilter_ (which would prevent us from
pushing them to Druid), or 2) extend the JSON generator as [~bslim] did.
I prefer option 2), as Hive does not expand those kind of predicates, but we
can still push them to Druid. The problem is that it is not possible to add
tests to DruidIT because of the Calcite IN clause expansion, but the solution
is not to alter Calcite behavior for all cases. Why don't we simply add a unit
test that verify the JSON that we are generating from the RexNode? That would
fix the problem.
In addition, can we add the case to generate JSON for the BETWEEN clause too
(if Druid does not support BETWEEN natively, we can just generate it as a range
predicate)? Otherwise, we will get the same Exception for BETWEEN clause.
> 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)