You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/01/25 01:52:00 UTC

[jira] [Created] (CALCITE-4478) In interpreter, support infinite relations

Julian Hyde created CALCITE-4478:
------------------------------------

             Summary: In interpreter, support infinite relations
                 Key: CALCITE-4478
                 URL: https://issues.apache.org/jira/browse/CALCITE-4478
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde


In interpreter, support infinite relations. Currently, if you execute {code}select *
from table("s"."fibonacci"())
limit 6{code}(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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)