adriangb commented on code in PR #15685:
URL: https://github.com/apache/datafusion/pull/15685#discussion_r2039623779
##########
datafusion/physical-expr/src/expressions/dynamic_filters.rs:
##########
@@ -335,22 +313,12 @@ mod test {
]));
// Each ParquetExec calls `with_new_children` on the
DynamicFilterPhysicalExpr
// and remaps the children to the file schema.
- let dynamic_filter_1 = reassign_predicate_columns(
- Arc::clone(&dynamic_filter) as Arc<dyn PhysicalExpr>,
- &filter_schema_1,
- false,
- )
- .unwrap();
- let snap = dynamic_filter_1.snapshot().unwrap().unwrap();
- insta::assert_snapshot!(format!("{snap:?}"), @r#"BinaryExpr { left:
Column { name: "a", index: 0 }, op: Eq, right: Literal { value: Int32(42) },
fail_on_overflow: false }"#);
- let dynamic_filter_2 = reassign_predicate_columns(
- Arc::clone(&dynamic_filter) as Arc<dyn PhysicalExpr>,
- &filter_schema_2,
- false,
- )
- .unwrap();
- let snap = dynamic_filter_2.snapshot().unwrap().unwrap();
- insta::assert_snapshot!(format!("{snap:?}"), @r#"BinaryExpr { left:
Column { name: "a", index: 1 }, op: Eq, right: Literal { value: Int32(42) },
fail_on_overflow: false }"#);
+ let dynamic_filter_1 =
dynamic_filter.with_schema(Arc::clone(&filter_schema_1));
+ let snap_1 = dynamic_filter_1.snapshot().unwrap().unwrap();
+ insta::assert_snapshot!(format!("{snap_1:?}"), @r#"BinaryExpr { left:
Column { name: "a", index: 0 }, op: Eq, right: Literal { value: Int32(42) },
fail_on_overflow: false }"#);
+ let dynamic_filter_2 =
dynamic_filter.with_schema(Arc::clone(&filter_schema_2));
Review Comment:
What is expected to call `with_schema`? This seems like a new method on
`DynamicFilterPhysicalExpr`. We need `reassign_predicate_columns` to work,
that's what gets called from within `ParquetSource`, etc.
##########
datafusion/physical-expr/src/expressions/dynamic_filters.rs:
##########
@@ -159,35 +139,13 @@ impl DynamicFilterPhysicalExpr {
)
})?
.clone();
- let inner =
- Self::remap_children(&self.children,
self.remapped_children.as_ref(), inner)?;
Review Comment:
This means that `evaluate` no longer uses a version with remapped children
right?
--
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]