Asura7969 commented on code in PR #8425:
URL: https://github.com/apache/arrow-datafusion/pull/8425#discussion_r1417481493


##########
datafusion/sqllogictest/test_files/select.slt:
##########
@@ -868,6 +868,21 @@ statement error DataFusion error: Error during planning: 
EXCLUDE or EXCEPT conta
 SELECT * EXCLUDE(d, b, c, a, a, b, c, d)
 FROM table1
 
+# avoiding adding an alias if the column name is the same
+query TT
+EXPLAIN select a as a FROM table1 order by a
+----
+logical_plan
+Sort: table1.a ASC NULLS LAST
+--TableScan: table1 projection=[a]
+physical_plan
+SortExec: expr=[a@0 ASC NULLS LAST]
+--MemoryExec: partitions=1, partition_sizes=[1]
+
+# ambiguous column references in on join
+query error DataFusion error: Schema error: Ambiguous reference to unqualified 
field a
+EXPLAIN select a as a FROM table1 t1 CROSS JOIN table1 t2 order by a

Review Comment:
   I added



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

Reply via email to