2010YOUY01 commented on code in PR #23078:
URL: https://github.com/apache/datafusion/pull/23078#discussion_r3457756502


##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -6610,6 +6611,63 @@ mod tests {
         Ok(())
     }
 
+    #[test]
+    fn test_swap_inputs_clears_dynamic_filter() -> Result<()> {

Review Comment:
   I think for now we should only assert that the dynamic filter is `None` when 
calling `swap_inputs()`.
   
   If your use case can follow the existing restriction, it should be both 
simpler and safer: it is very natural to first decide the join order and then 
construct dynamic filters, rather than build some dynamic filters -> swap the 
join order -> build the remaining dynamic filters.
   
   This likely means ensuring extension physical optimizer rules follow the 
same restriction: dynamic filter construction rules should be placed after 
rules that swap join input orders.
   
   If there are cases that cannot be solved this way, we can discuss them 
separately.



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