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


##########
datafusion/sqllogictest/test_files/order.slt:
##########
@@ -888,6 +888,30 @@ select column2, column1 from foo ORDER BY column2 desc, 
column1 desc;
 [1] 4
 [0] 2
 
+# Test issue: https://github.com/apache/datafusion/issues/10013
+# There is both a HAVING clause and an ORDER BY clause in the query.
+query I
+SELECT
+   SUM(column1)
+FROM foo
+HAVING SUM(column1) > 0
+ORDER BY SUM(column1)
+----
+16
+
+statement ok
+create table ambiguity_test(a int, b int) as values (1,2), (2,1);

Review Comment:
   Could we please use different values here to distinguish what rows the 
values came from (I found it very hard to follow which columns are referenced 
was doing)
   
   Something like this perhaps:
   ```suggestion
   create table ambiguity_test(a int, b int) as values (1,20), (2,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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to