Skip to content

Commit 0c4469f

Browse files
committed
fix: add missing ProducerKind arg to DynamicFilterPhysicalExpr::new in tests
1 parent c6c5afd commit 0c4469f

1 file changed

Lines changed: 30 additions & 11 deletions

File tree

datafusion/physical-expr/src/expressions/dynamic_filters.rs

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,11 @@ mod test {
603603
#[test]
604604
fn test_snapshot() {
605605
let expr = lit(42) as Arc<dyn PhysicalExpr>;
606-
let dynamic_filter = DynamicFilterPhysicalExpr::new(vec![], Arc::clone(&expr));
606+
let dynamic_filter = DynamicFilterPhysicalExpr::new(
607+
vec![],
608+
Arc::clone(&expr),
609+
ProducerKind::HashJoin,
610+
);
607611

608612
// Take a snapshot of the current expression
609613
let snapshot = dynamic_filter.snapshot().unwrap();
@@ -619,8 +623,11 @@ mod test {
619623

620624
#[test]
621625
fn test_dynamic_filter_physical_expr_misbehaves_data_type_nullable() {
622-
let dynamic_filter =
623-
DynamicFilterPhysicalExpr::new(vec![], lit(42) as Arc<dyn PhysicalExpr>);
626+
let dynamic_filter = DynamicFilterPhysicalExpr::new(
627+
vec![],
628+
lit(42) as Arc<dyn PhysicalExpr>,
629+
ProducerKind::HashJoin,
630+
);
624631

625632
// First call to data_type and nullable should set the initial values.
626633
let initial_data_type = dynamic_filter.data_type(&Schema::empty()).unwrap();
@@ -810,8 +817,11 @@ mod test {
810817
use std::hash::{Hash, Hasher};
811818

812819
// Create filter with initial value
813-
let filter =
814-
DynamicFilterPhysicalExpr::new(vec![], lit(true) as Arc<dyn PhysicalExpr>);
820+
let filter = DynamicFilterPhysicalExpr::new(
821+
vec![],
822+
lit(true) as Arc<dyn PhysicalExpr>,
823+
ProducerKind::HashJoin,
824+
);
815825

816826
// Compute hash BEFORE update
817827
let mut hasher_before = DefaultHasher::new();
@@ -844,10 +854,16 @@ mod test {
844854
#[test]
845855
fn test_identity_based_equality() {
846856
// Create two separate filters with identical initial expressions
847-
let filter1 =
848-
DynamicFilterPhysicalExpr::new(vec![], lit(true) as Arc<dyn PhysicalExpr>);
849-
let filter2 =
850-
DynamicFilterPhysicalExpr::new(vec![], lit(true) as Arc<dyn PhysicalExpr>);
857+
let filter1 = DynamicFilterPhysicalExpr::new(
858+
vec![],
859+
lit(true) as Arc<dyn PhysicalExpr>,
860+
ProducerKind::HashJoin,
861+
);
862+
let filter2 = DynamicFilterPhysicalExpr::new(
863+
vec![],
864+
lit(true) as Arc<dyn PhysicalExpr>,
865+
ProducerKind::HashJoin,
866+
);
851867

852868
// Different instances should NOT be equal even with same expression
853869
// because they have independent inner Arcs (different update lifecycles)
@@ -867,8 +883,11 @@ mod test {
867883
use std::collections::hash_map::DefaultHasher;
868884
use std::hash::{Hash, Hasher};
869885

870-
let filter =
871-
DynamicFilterPhysicalExpr::new(vec![], lit(true) as Arc<dyn PhysicalExpr>);
886+
let filter = DynamicFilterPhysicalExpr::new(
887+
vec![],
888+
lit(true) as Arc<dyn PhysicalExpr>,
889+
ProducerKind::HashJoin,
890+
);
872891

873892
// Compute hash twice for the same instance
874893
let hash1 = {

0 commit comments

Comments
 (0)