zhuqi-lucas commented on code in PR #19446:
URL: https://github.com/apache/datafusion/pull/19446#discussion_r2649172857


##########
datafusion/core/tests/physical_optimizer/test_utils.rs:
##########
@@ -823,3 +825,157 @@ pub fn sort_expr_named(name: &str, index: usize) -> 
PhysicalSortExpr {
         options: SortOptions::default(),
     }
 }
+
+/// A test data source that can display any requested ordering
+/// This is useful for testing sort pushdown behavior
+#[derive(Debug, Clone)]
+pub struct TestScan {

Review Comment:
   Yes @alamb, I looked at reusing filter_pushdown/util.rs's TestSource, but 
it's tailored for filter pushdown with specific output formatting (predicate 
display, etc.). 
   
   For sort pushdown, I need different output (requested_ordering, 
reverse_row_groups) to verify the optimization works correctly. A dedicated 
TestScan keeps the concerns separated and makes test snapshots clearer.



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