adriangb commented on code in PR #15057:
URL: https://github.com/apache/datafusion/pull/15057#discussion_r2190141364


##########
datafusion/datasource-parquet/src/opener.rs:
##########
@@ -233,21 +238,31 @@ impl FileOpener for ParquetOpener {
                 }
             }
 
+            predicate = predicate
+                .map(|p| {
+                    if let Some(predicate_rewrite_hook) = 
predicate_rewrite_hook.as_ref()
+                    {
+                        predicate_rewrite_hook
+                            .rewrite(Arc::clone(&p), &physical_file_schema)
+                    } else {
+                        Ok(p)
+                    }
+                })
+                .transpose()?;

Review Comment:
   It's not clear to me if it's better if this runs before the 
`PhysicalExprSchemaRewriter` and the simplifier or somehow during it. Running 
it after doesn't really work because expressions may be simplified away or 
filled in with nulls (e.g. because it's accessing a shredded variant field that 
doesn't exist at the table schema level)



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