AdamGS commented on code in PR #20822:
URL: https://github.com/apache/datafusion/pull/20822#discussion_r2906200029
##########
datafusion/datasource-parquet/src/row_filter.rs:
##########
@@ -368,6 +394,31 @@ impl TreeNodeVisitor<'_> for PushdownChecker<'_> {
type Node = Arc<dyn PhysicalExpr>;
fn f_down(&mut self, node: &Self::Node) -> Result<TreeNodeRecursion> {
+ // check for get_field(Column("foo"), "bar", ...) accessing a struct
field
+ // the resolved return type tells us the leaf type
+ // if it's non0nested, we can pushdown by recording the root column
index and skip children
+ // this way, the visitor never sees the raw struct Column and rejects
it
+ if let Some(func) = node.as_any().downcast_ref::<ScalarFunctionExpr>()
+ && func.name() == "get_field"
Review Comment:
you can do `ScalarFunctionExpr::try_downcast_func::<GetFieldFunc>(func)` here
--
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]