xudong963 commented on PR #15683:
URL: https://github.com/apache/datafusion/pull/15683#issuecomment-2796589760
I don't understand the failing sqllogictest:
```
# Check output plan again, expect no "output_ordering" clause in the
physical_plan -> ParquetExec,
# due to there being more files than partitions:
query TT
EXPLAIN SELECT int_col, string_col
FROM test_table
ORDER BY string_col, int_col;
----
logical_plan
01)Sort: test_table.string_col ASC NULLS LAST, test_table.int_col ASC NULLS
LAST
02)--TableScan: test_table projection=[int_col, string_col]
physical_plan
01)SortPreservingMergeExec: [string_col@1 ASC NULLS LAST, int_col@0 ASC
NULLS LAST]
02)--SortExec: expr=[string_col@1 ASC NULLS LAST, int_col@0 ASC NULLS LAST],
preserve_partitioning=[true]
03)----DataSourceExec: file_groups={2 groups:
[[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/test_table/0.parquet,
WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/test_table/1.parquet],
[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/test_table/2.parquet]]},
projection=[int_col, string_col], file_type=parquet
```
Based on current code and doc, my understanding is that the
`output_ordering`, aka. `file_sort_order` refers to the file order, that is, if
we specify the output_ordering, what we can ensure is that the data in a single
file is ordered.
https://datafusion.apache.org/user-guide/sql/ddl.html#cautions-when-using-the-with-order-clause
So why `expect no "output_ordering" clause in the physical_plan ->
ParquetExec due to there being more files than partitions`? 🤔
--
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]