siddubakka commented on code in PR #26123:
URL: https://github.com/apache/datafusion/pull/26123#discussion_r4222617813
##########
datafusion/core/tests/physical_optimizer/join_selection.rs:
##########
@@ -1969,3 +1971,57 @@ fn test_join_with_maybe_swap_unbounded_case(t: TestCase)
-> Result<()> {
}
Ok(())
}
+
+#[rstest]
+#[case(PartitionMode::CollectLeft)]
+#[case(PartitionMode::Partitioned)]
+#[tokio::test]
+async fn test_join_selection_skips_hash_join_with_dynamic_filter(
+ #[case] partition_mode: PartitionMode,
+) -> Result<()> {
+ // Left has larger statistics than right, which would normally trigger swap
+ let (big, small) = create_big_and_small();
+ let on = vec![(
+ Arc::new(Column::new_with_schema("big_col", &big.schema())?) as
PhysicalExprRef,
+ Arc::new(Column::new_with_schema("small_col", &small.schema())?)
+ as PhysicalExprRef,
+ )];
+
+ let dynamic_filter = Arc::new(DynamicFilterPhysicalExpr::new(
+ vec![Arc::clone(&on[0].1)],
+ lit(true),
+ ));
+
+ #[allow(deprecated)]
Review Comment:
@mikamikasuki thank you for your help i have made the changes now
--
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]