mustafasrepo commented on code in PR #9854:
URL: https://github.com/apache/arrow-datafusion/pull/9854#discussion_r1544300915


##########
datafusion/sqllogictest/test_files/order.slt:
##########
@@ -891,3 +891,32 @@ select column2, column1 from foo ORDER BY column2 desc, 
column1 desc;
 # Cleanup
 statement ok
 drop table foo;
+
+# Casting from numeric to string types breaks the ordering
+statement ok
+CREATE EXTERNAL TABLE ordered_table (
+  a0 INTEGER,
+  a INTEGER,
+  b INTEGER,
+  c INTEGER,
+  d INTEGER
+)
+STORED AS CSV
+WITH HEADER ROW
+WITH ORDER (c ASC)
+LOCATION '../core/tests/data/window_2.csv';
+
+query T

Review Comment:
   Can you also add a plan test that shows plan has correponding `SortExec`. 
Similarly, can you add a where cast is towards `BIGINT` and in the final plan 
`SortExec` is optimized away.



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