alamb commented on code in PR #10876:
URL: https://github.com/apache/datafusion/pull/10876#discussion_r1642649045


##########
datafusion/sqllogictest/test_files/cte.slt:
##########
@@ -828,3 +828,10 @@ SELECT * FROM non_recursive_cte, recursive_cte;
 ----
 1 1
 1 3
+
+# Name shadowing:
+# The first `t` refers to the table, the second to the CTE.
+query I
+WITH t AS (SELECT * FROM t where t.a < 2) SELECT * FROM t

Review Comment:
   I verified this query fails on main:
   
   ```sql
   DataFusion CLI v39.0.0
   > WITH t AS (SELECT * FROM t where t.a < 2) SELECT * FROM t;
   Error during planning: table 'datafusion.public.t' not found
   ```
   



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