Anton Haidai created CALCITE-2618:
-------------------------------------

             Summary: It is not possible to execute IN on Enumerable: "cannot 
translate call IN"
                 Key: CALCITE-2618
                 URL: https://issues.apache.org/jira/browse/CALCITE-2618
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.17.0
            Reporter: Anton Haidai
            Assignee: Julian Hyde


It is not possible to execute IN on Enumerable.

Logical plan node:
{code:java}
LogicalFilter(condition=[IN($1, 'Aaron', 'Abbeville', 'Abbot')])
{code}
Physical plan node:
{code:java}
EnumerableCalc( ... expr#53=[IN($t0, $t3, $t4)])
{code}
Error message when trying to execute the plan:
{code:java}
Caused by: java.lang.RuntimeException: cannot translate call IN($t0, $t3, $t4)
at 
org.apache.calcite.adapter.enumerable.RexToLixTranslator.translateCall(RexToLixTranslator.java:725)
at 
org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate0(RexToLixTranslator.java:699)
at 
org.apache.calcite.adapter.enumerable.RexToLixTranslator.translate(RexToLixTranslator.java:221)
...{code}
The issue occurs because "IN" is absent in RexImpTable.

It is not possible to reproduce the issue using SQL as far as INs in SQL 
queries are always replaced either by ORs, or by a subselect (see CALCITE-2444 
for a similar issue). But it is possible to reproduce the issue when creating a 
filter with "IN" using RelBuilder.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to