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)