Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.17.0
-
None
-
None
Description
It is not possible to execute IN on Enumerable.
Logical plan node:
LogicalFilter(condition=[IN($1, 'Aaron', 'Abbeville', 'Abbot')])
Physical plan node:
EnumerableCalc( ... expr#53=[IN($t0, $t3, $t4)])
Error message when trying to execute the plan:
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) ...
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.
Attachments
Issue Links
- blocks
-
CALCITE-2630 Convert SqlInOperator to In-Expression
- Open