2010YOUY01 commented on code in PR #18282:
URL: https://github.com/apache/datafusion/pull/18282#discussion_r2464608171


##########
datafusion/sqllogictest/test_files/information_schema.slt:
##########
@@ -705,6 +705,38 @@ SHOW CREATE TABLE abc;
 ----
 datafusion public abc CREATE EXTERNAL TABLE abc STORED AS CSV LOCATION 
../../testing/data/csv/aggregate_test_100.csv
 
+# show_external_create_table_with_order
+statement ok
+CREATE EXTERNAL TABLE abc_ordered
+STORED AS CSV
+WITH ORDER (c1)
+LOCATION '../../testing/data/csv/aggregate_test_100.csv'
+OPTIONS ('format.has_header' 'true');
+
+query TTTT
+SHOW CREATE TABLE abc_ordered;
+----
+datafusion public abc_ordered CREATE EXTERNAL TABLE abc_ordered STORED AS CSV 
WITH ORDER (c1) LOCATION ../../testing/data/csv/aggregate_test_100.csv
+
+statement ok
+DROP TABLE abc_ordered;
+
+# show_external_create_table_with_multiple_order_columns
+statement ok
+CREATE EXTERNAL TABLE abc_multi_order
+STORED AS CSV
+WITH ORDER (c1, c2 DESC)
+LOCATION '../../testing/data/csv/aggregate_test_100.csv'
+OPTIONS ('format.has_header' 'true');
+
+query TTTT
+SHOW CREATE TABLE abc_multi_order;
+----
+datafusion public abc_multi_order CREATE EXTERNAL TABLE abc_multi_order STORED 
AS CSV WITH ORDER (c1, c2 DESC) LOCATION 
../../testing/data/csv/aggregate_test_100.csv

Review Comment:
   I suggest to also test null options like `... WITH ORDER (c1 NULLS LAST, c2 
DESC NULLS FIRST)...`



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

Reply via email to