xudong963 commented on code in PR #17201: URL: https://github.com/apache/datafusion/pull/17201#discussion_r2278705941
########## datafusion/physical-plan/src/joins/hash_join.rs: ########## @@ -804,8 +805,8 @@ impl ExecutionPlan for HashJoinExec { self.mode, self.null_equality, )?; - // Preserve the dynamic filter if it exists - new_join.dynamic_filter = Arc::clone(&self.dynamic_filter); + // Create a new dynamic filter with swapped keys after inputs are swapped + new_join.dynamic_filter = Self::create_dynamic_filter(&new_join.on); Ok(Arc::new(new_join)) Review Comment: Oh, I got it, I was thinking the `create_dynamic_filter` is called during the hash join execution (after join_selection). After checking the code, it'll be created during logicalplan -> physicalplan (the physical plan construction phase). So it makes more sense to deploy the `create_dynamic_filter` to me. -- 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