rank-p commented on code in PR #27163:
URL: https://github.com/apache/datafusion/pull/27163#discussion_r4596171961


##########
datafusion/core/tests/parquet/ordering.rs:
##########
@@ -168,3 +178,257 @@ fn find_parquet_file(
 
     Ok(None)
 }
+
+const ASC_NULLS_LAST: SortOptions = SortOptions {
+    descending: false,
+    nulls_first: false,
+};
+
+/// Each row group is sorted by `a`, but the file is not.
+#[tokio::test]
+async fn test_unordered_row_groups_are_sorted() -> Result<()> {

Review Comment:
   Some clarification on the bug. The behavior that leads to a wrong result is 
that we have 2 row groups, e.g. `[1,4], [2,3]` with sorting_columns declared. 
Both are individually sorted, but the file is globally not sorted. These tests 
assert that the plan contains a `SortExec` in this case. There are also tests 
to assert that the plan das not contain an unnecessary `SortExec` in a case 
like `[1,2], [3,4]` where the file is already globally sorted.
   
   Then there are also some test cases that assert the same thing in case a 
`NULL` is included or for the case of two columns.
   



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