alamb commented on code in PR #16433: URL: https://github.com/apache/datafusion/pull/16433#discussion_r2282739532
########## datafusion/physical-expr/src/expressions/dynamic_filters.rs: ########## @@ -137,7 +139,7 @@ impl DynamicFilterPhysicalExpr { Self { children, remapped_children: None, // Initially no remapped children - inner: Arc::new(RwLock::new(Inner::new(inner))), + inner: Arc::new(ArcSwap::from_pointee(Inner::new(inner))), Review Comment: do we have evidence that using ArcSwap is needed for performance? I think we could use `parking_lot` mutexes if we wanted to make the code cleaner (not check for Lock poisioning) ########## datafusion/physical-plan/src/sorts/sort.rs: ########## @@ -1158,7 +1153,10 @@ impl ExecutionPlan for SortExec { context.session_config().batch_size(), context.runtime_env(), &self.metrics_set, - self.filter.clone(), + self.filter + .as_ref() + .expect("Filter should be set when fetch is Some") + .clone(), Review Comment: I recommend turning this into an internal error so that if someone does hit this for some reason the symptom is less severe -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org