jayzhan211 commented on code in PR #26670:
URL: https://github.com/apache/datafusion/pull/26670#discussion_r4369549545


##########
datafusion/physical-plan/src/sorts/sort.rs:
##########
@@ -1440,7 +1440,10 @@ impl ExecutionPlan for SortExec {
             .expect("rebuilt SortExec with new children")
             .clone();
         // Our dynamic filter and execution metrics are the state we need to 
reset.
-        new_sort.filter = Some(new_sort.create_filter());
+        if let Some(filter) = &new_sort.filter {
+            filter.read().expr().reset()?;

Review Comment:
   nit: #26669 makes `DynamicFilterPhysicalExpr::reset()` infallible, so this 
`?` won't compile once both PRs are in. The two PRs touch different files, so 
git won't flag a conflict. Could you drop the `?` in whichever of the two 
merges second (or rebase this one on #26669)?
   
   ```diff
   -            filter.read().expr().reset()?;
   +            filter.read().expr().reset();
   ```



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