waynexia commented on code in PR #7981:
URL: https://github.com/apache/arrow-datafusion/pull/7981#discussion_r1379556954


##########
datafusion/sqllogictest/test_files/distinct_on.slt:
##########


Review Comment:
   These cases are excellent 👍 . It might be better if we could include some 
negative cases. Here are two I got from PG:
   
   ```postgresql
   SELECT DISTINCT ON () c1, c2 FROM aggregate_test_100 ORDER BY c1, c3;
   ERROR:  syntax error at or near ")"
   LINE 1: SELECT DISTINCT ON () c1, c2 FROM aggregate_test_100 ORDER B...
   
   SELECT DISTINCT ON (c2) c1, c2 FROM aggregate_test_100 ORDER BY c1, c3;
   ERROR:  SELECT DISTINCT ON expressions must match initial ORDER BY 
expressions
   LINE 1: SELECT DISTINCT ON (c2) c1, c2 FROM aggregate_test_100 ORDER...
   ```



##########
datafusion/sqllogictest/test_files/distinct_on.slt:
##########


Review Comment:
   These cases are excellent 👍 . It might be better if we could include some 
negative cases. Here are two I got from PG:
   
   ```postgresql
   SELECT DISTINCT ON () c1, c2 FROM aggregate_test_100 ORDER BY c1, c3;
   ERROR:  syntax error at or near ")"
   LINE 1: SELECT DISTINCT ON () c1, c2 FROM aggregate_test_100 ORDER B...
   
   SELECT DISTINCT ON (c2) c1, c2 FROM aggregate_test_100 ORDER BY c1, c3;
   ERROR:  SELECT DISTINCT ON expressions must match initial ORDER BY 
expressions
   LINE 1: SELECT DISTINCT ON (c2) c1, c2 FROM aggregate_test_100 ORDER...
   ```



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