kosiew commented on PR #22037:
URL: https://github.com/apache/datafusion/pull/22037#issuecomment-4416975375

   @neilconway 
   Thanks for this test case:
   
   ```
   SET datafusion.execution.enable_recursive_ctes = true;
   
     WITH RECURSIVE t AS (
       SELECT 0 AS n
       UNION ALL
       SELECT CAST(NULL AS INT) AS n FROM t WHERE n IS NOT NULL
     )
     SELECT * FROM t;
   ```
   and this suggestion
   ```
   shouldn't we be computing the CTE's logical schema by widening the anchor 
and the recursive schemas? This is conceptually similar to what we do for 
UNION. That is, if the anchor expression is non-nullable and the recursive 
expression is nullable, the output schema should be nullable.
   ```
   


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