alamb commented on code in PR #21362: URL: https://github.com/apache/datafusion/pull/21362#discussion_r3066496405
########## datafusion/sqllogictest/test_files/order.slt: ########## @@ -1521,7 +1579,7 @@ query TT EXPLAIN SELECT c1, c2 FROM table_with_ordered_pk ORDER BY c1, c2; ---- logical_plan -01)Sort: table_with_ordered_pk.c1 ASC NULLS LAST, table_with_ordered_pk.c2 ASC NULLS LAST +01)Sort: table_with_ordered_pk.c1 ASC NULLS LAST Review Comment: I don't understand this change -- the query requires `ORDR BY c1, c2` but now the query only sorts on c1. The primary key on `c1` means there are no duplicates, but how does that ensure it is also ordered by `c2` For example what about ```sql INSERT INTO table VALUES (1,2) INSERT INTO table VALUES (2,1) ``` That is still ordered by c1, but if you don't also sort of c2, you'll end up with the wrong sort -- 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]
