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

In interpreter, support infinite relations

    XMLWordPrintableJSON

Details

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

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

              Dates

                Created:
                Updated: