haohuaijin commented on code in PR #21527:
URL: https://github.com/apache/datafusion/pull/21527#discussion_r3083283707


##########
datafusion/physical-plan/src/sorts/sort.rs:
##########
@@ -1424,6 +1426,50 @@ impl ExecutionPlan for SortExec {
 
         Ok(FilterDescription::new().with_child(child))
     }
+
+    fn handle_child_pushdown_result(
+        &self,
+        phase: FilterPushdownPhase,
+        child_pushdown_result: ChildPushdownResult,
+        _config: &datafusion_common::config::ConfigOptions,
+    ) -> Result<FilterPushdownPropagation<Arc<dyn ExecutionPlan>>> {
+        // Only absorb filters in Pre phase for a plain sort (no fetch).
+        // A sort with fetch (TopK) must not accept filters: reordering
+        // filter vs. limit would change semantics.
+        if phase != FilterPushdownPhase::Pre || self.fetch.is_some() {

Review Comment:
   done, removed in 
[e06bdc2](https://github.com/apache/datafusion/pull/21527/commits/e06bdc26f018e2a62ddba44c514901dc4555bbe0),
 ~but it affect some test case, solving it~, solved



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