alamb opened a new issue, #9554:
URL: https://github.com/apache/arrow-datafusion/issues/9554

   ### Is your feature request related to a problem or challenge?
   
   As part of https://github.com/apache/arrow-datafusion/issues/462, 
@matthewgapp implemented  support for recursive Common Table Expressions (aka 
Recursive CTEs) 
   
   Here is an example of such a query:
   
   
https://github.com/apache/arrow-datafusion/blob/4cd3c433004a7a6825643d6b3911db720efe5f76/datafusion/sqllogictest/test_files/cte.slt#L44-L68
   
   At the moment, to use recursive CTEs you must enable a config option:
   ```sql
   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
   1. Extend `RecursiveQueryExec` with a `MemoryReservation`
   2. Track the memory of any buffered batches, erroring if they can not be 
buffered
   3. Write a test in `memory_limit.rs` showing the limit being hit: 
https://github.com/apache/arrow-datafusion/blob/main/datafusion/core/tests/memory_limit.rs
   4. Change the default value of 
   
   The main PR that added this feature was 
https://github.com/apache/arrow-datafusion/pull/8840
   
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to