-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
As part of #462, @matthewgapp implemented support for recursive Common Table Expressions (aka Recursive CTEs)
Here is an example of such a query:
At the moment, to use recursive CTEs you must enable a config option:
set datafusion.execution.enable_recursive_ctes = true;Describe the solution you'd like
I would like recursive CTEs to be enabled by default (and thus useable without a config option)
The only reason I know of at the moment that they are NOT enabled by default is because they might buffer an infinite amount of data (and thus exceed the total memory available to DataFusion)
Describe alternatives you've considered
I think the basic idea would be to
- Extend
RecursiveQueryExecwith aMemoryReservation - Track the memory of any buffered batches, erroring if they can not be buffered
- Write a test in
memory_limit.rsshowing the limit being hit: https://github.com/apache/arrow-datafusion/blob/main/datafusion/core/tests/memory_limit.rs - Change the default value of
The main PR that added this feature was #8840
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request