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

Implement Uncollect relational operator in Interpreter (for SQL queries that use UNNEST)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.21.0
    • 1.22.0
    • core

    Description

      Using unnest in Interpreter will cause exception,

      // InterpreterTest
      @Test public void testInterpretUnnest() throws Exception {
          final String sql = "select * from unnest(multiset[1, 2])";
          sql(sql).returnsRows("[1]", "[2]");
        }
      

      got

      java.lang.AssertionError: interpreter: no implementation for class org.apache.calcite.rel.core.Uncollect
      	at org.apache.calcite.interpreter.Interpreter$CompilerImpl.visit(Interpreter.java:463)
      	at org.apache.calcite.interpreter.Nodes$CoreCompiler.visit(Nodes.java:44)
      	at org.apache.calcite.rel.SingleRel.childrenAccept(SingleRel.java:72)
      	at org.apache.calcite.interpreter.Interpreter$CompilerImpl.visit(Interpreter.java:450)
      	at org.apache.calcite.interpreter.Nodes$CoreCompiler.visit(Nodes.java:44)
      	at org.apache.calcite.interpreter.Interpreter$CompilerImpl.visitRoot(Interpreter.java:408)
      	at org.apache.calcite.interpreter.Interpreter.<init>(Interpreter.java:89)
      	at org.apache.calcite.test.InterpreterTest$Sql.returnsRows(InterpreterTest.java:121)
      	at org.apache.calcite.test.InterpreterTest$Sql.returnsRows(InterpreterTest.java:105)
      	at org.apache.calcite.test.InterpreterTest.testInterpretUnnest(InterpreterTest.java:446)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      

      Add support to use unnest in Interpreter.

      Attachments

        Issue Links

          Activity

            People

              yanlin-Lynn Wang Yanlin
              yanlin-Lynn Wang Yanlin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h