kosiew commented on code in PR #23098:
URL: https://github.com/apache/datafusion/pull/23098#discussion_r3474068493


##########
datafusion/sqllogictest/test_files/cte.slt:
##########
@@ -179,6 +179,95 @@ physical_plan
 07)--------RepartitionExec: partitioning=RoundRobinBatch(4), input_partitions=1
 08)----------WorkTableExec: name=nodes
 
+# recursive CTE with a column-list alias (e.g. `t(n)`): the declared names 
must be
+# applied to the static term so the recursive self-reference can resolve them
+query I rowsort
+WITH RECURSIVE t(n) AS (

Review Comment:
   Nice improvement! One small suggestion: could we add a regression test with 
a quoted recursive CTE column-list alias, for example `WITH RECURSIVE t("N") AS 
(...) SELECT "N" FROM t`? I think it would be helpful to document that quoted 
and case-sensitive aliases are preserved in the recursive work table as well. 
This is not blocking since the implementation already goes through the existing 
alias normalization path.



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