alamb commented on code in PR #19446:
URL: https://github.com/apache/datafusion/pull/19446#discussion_r2649119554
##########
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:
Maybe you mean
https://github.com/apache/datafusion/blob/ae35177df5b6f98ab55b7080faa49265e2491233/datafusion/core/tests/physical_optimizer/filter_pushdown/util.rs#L219
?
##########
datafusion/datasource/src/file.rs:
##########
@@ -150,15 +150,46 @@ pub trait FileSource: Send + Sync {
/// Try to create a new FileSource that can produce data in the specified
sort order.
///
+ /// This method attempts to optimize data retrieval to match the requested
ordering.
+ /// It receives both the requested ordering and equivalence properties
that describe
+ /// relationships between expressions (e.g., constant columns, monotonic
functions).
+ ///
+ /// # Parameters
+ /// * `order` - The requested sort ordering
+ /// * `eq_properties` - Equivalence properties that can be used to
determine if a reversed
Review Comment:
it might help here to clarify what the eq_properties represents (does it
represent the eq_properties of the data coming from the file source?)
--
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]