Omega359 commented on PR #22476:
URL: https://github.com/apache/datafusion/pull/22476#issuecomment-4529112162

   This PR tests the recursive CTE projection fix for UNION ALL, but not for 
recursive UNION where an outer-unselected column still affects distinctness. 
This matters because pruning that column would collapse distinct rows 
incorrectly. The test is below.
   
   ```
   # Keep columns that are not selected by the outer query, but still affect
   # recursive UNION distinctness.
   query I
   with recursive t(k, v) as (
     select 1 k, 10 v
     union
     select 2, 10 from t where v = 10
   )
   select v
   from t
   order by 1;
   ----
   10
   10
   ```


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