xudong963 commented on code in PR #16445:
URL: https://github.com/apache/datafusion/pull/16445#discussion_r2162979272


##########
datafusion/core/tests/physical_optimizer/filter_pushdown/mod.rs:
##########
@@ -433,6 +433,117 @@ async fn test_topk_dynamic_filter_pushdown() {
     );
 }
 
+#[tokio::test]
+async fn test_hashjoin_dynamic_filter_pushdown() {

Review Comment:
   Can we add some tests for multiple joins? Such as
   
   ```
   Join (t1.a = t2.b)
   /        \
   t1    Join(t2.c = t3.d)
           /    \
          t3   t2
   ```       



##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -666,10 +679,25 @@ impl DisplayAs for HashJoinExec {
                     .map(|(c1, c2)| format!("({c1}, {c2})"))
                     .collect::<Vec<String>>()
                     .join(", ");
+                let dynamic_filter_display =
+                    if let Ok(current) = self.dynamic_filter.current() {
+                        if !current.eq(&lit(true)) {
+                            format!(", filter=[{current}]")
+                        } else {
+                            "".to_string()
+                        }
+                    } else {
+                        "".to_string()
+                    };

Review Comment:
   How about this:
   ```rust
   let dynamic_filter_display = match self.dynamic_filter.current() {
       Ok(current) if current != lit(true) => format!(", filter=[{current}]"),
       _ => "".to_string(),
   };
   ```



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

Reply via email to