Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-2618

It is not possible to execute IN on Enumerable: "cannot translate call IN"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.17.0
    • None
    • core
    • 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

          Activity

            People

              Unassigned Unassigned
              anha Anton Haidai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: