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

In interpreter, support infinite relations

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      In interpreter, support infinite relations. Currently, if you execute

      select *
      from table("s"."fibonacci"())
      limit 6

      (by modifying InterpreterTest.testInterpretNilaryTableFunction() slightly) you get an OutOfMemoryError.

      The reason is that TableFunctionScanNode tries to run to completion before handing over control to SortNode (which performs the LIMIT 6). The intermediate result is an unbounded list (ArrayDeque).

      The solution would be for each operator to yield every so often.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: