[
https://issues.apache.org/jira/browse/DRILL-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917871#comment-13917871
]
Julian Hyde commented on DRILL-391:
-----------------------------------
DRILL-57 is marked fix. So, maybe we have implemented a VALUES operator?
In case anyone is wondering why a VALUES operator occurs here. For small IN we
expand to OR as you might expect (x IN (1, 2) becomes x = 1 OR x = 2). But for
large IN we figure that you might want to execute it as a join to a constant
table (probably an in-memory hash table). If we had instead expanded to a
massive OR it would be virtually impossible for any optimizer to convert it
back to a table.
> IN-list predicate with 20 or more elements gives UnsupportedOperationException
> ------------------------------------------------------------------------------
>
> Key: DRILL-391
> URL: https://issues.apache.org/jira/browse/DRILL-391
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Aman Sinha
>
> select _MAP['N_REGIONKEY'], _MAP['N_NATIONKEY'] FROM
> "/tmp/parquet/nation.parquet" where cast(_MAP['N_NATIONKEY'] as int) in (1,
> 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
> java.lang.UnsupportedOperationException
> at
> org.apache.drill.optiq.DrillValuesRel.implement(DrillValuesRel.java:51)
> at
> org.apache.drill.optiq.DrillImplementor.visitChild(DrillImplementor.java:143)
> at
> org.apache.drill.optiq.DrillAggregateRel.implement(DrillAggregateRel.java:62)
> at
> org.apache.drill.optiq.DrillImplementor.visitChild(DrillImplementor.java:143)
> at
> org.apache.drill.optiq.DrillJoinRel.implementInput(DrillJoinRel.java:98)
> at org.apache.drill.optiq.DrillJoinRel.implement(DrillJoinRel.java:75)
> at
> org.apache.drill.optiq.DrillImplementor.visitChild(DrillImplementor.java:143)
> at
> org.apache.drill.optiq.DrillProjectRel.implement(DrillProjectRel.java:63)
--
This message was sent by Atlassian JIRA
(v6.2#6252)