jayzhan211 commented on code in PR #27208:
URL: https://github.com/apache/datafusion/pull/27208#discussion_r4504890680
##########
datafusion/sqllogictest/test_files/ddl.slt:
##########
@@ -1343,3 +1343,21 @@ create database cat;
statement ok
drop database cat;
+
+##########
+# A pipeline-breaking operator on an unbounded input should be reported with
+# its EXPLAIN-style one-line form, not the operator's Debug representation.
+##########
+
+statement ok
+CREATE UNBOUNDED EXTERNAL TABLE ordering_on_unbounded (
+ a0 INT, a INT, b INT, c INT, d INT
+) STORED AS CSV
+LOCATION '../core/tests/data/window_2.csv'
+OPTIONS ('format.has_header' 'true');
+
+statement error Error during planning: Cannot execute pipeline breaking
queries, operator: SortExec: TopK\(fetch=1\), expr=\[d@4 ASC NULLS LAST\],
preserve_partitioning=\[false\]
+SELECT * FROM ordering_on_unbounded ORDER BY d LIMIT 1;
Review Comment:
Optional cleanup: the escaped regex is hard to read. `statement error` can
take the expected message as plain text after `----`, like `functions.slt`
does, which also checks the whole message. The block needs two blank lines
after it; with one, the next `statement ok` is read as part of the expected
error and the test fails:
```suggestion
statement error
SELECT * FROM ordering_on_unbounded ORDER BY d LIMIT 1;
----
DataFusion error: SanityCheckPlan
caused by
Error during planning: Cannot execute pipeline breaking queries, operator:
SortExec: TopK(fetch=1), expr=[d@4 ASC NULLS LAST],
preserve_partitioning=[false]
```
--
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]