nuno-faria opened a new pull request, #22476:
URL: https://github.com/apache/datafusion/pull/22476

   ## Which issue does this PR close?
   
   - Closes #22249.
   - Closes #17853.
   
   ## Rationale for this change
   
   Optimize projections for the static and recursive terms of recursive CTEs 
just like regular subqueries. The previous implementation optimized projections 
based on the outer columns, which could cause bugs.
   
   This new implementation still ensures that #16684 remains fixed.
   
   ## What changes are included in this PR?
   
   - Updated `optimize_projections` to be applied to the static and recursive 
terms of a recursive query.
   - Updated and added tests.
   
   ## Are these changes tested?
   
   Yes.
   
   ## Are there any user-facing changes?
   
   Maybe if the user relied on projections being pushed down from the outer 
query to the recursive CTE, but this can be fixed by removing those unnecessary 
projections directly in the CTE.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to