adriangb commented on PR #15057: URL: https://github.com/apache/datafusion/pull/15057#issuecomment-2801415154
> This is likely only applied to parquet filter so we can rewrite the filter when we know the filter + file_schema + table_schema (probably `build_row_filter`). We don't need optimize rule or trait method unless this rule could be applied more generally. Yes agreed, that's basically what's in this PR currently: a custom trait to implement an optimizer pass with all of that information available. My questions are: 1. Is this the right API, or should some of the information on how to optimize / adapt to a specific file schema live in `PhysicalExpr::with_file_schema` or something like that? 2. Can we use this mechanism both for `variant_get(col, 'key')` -> `col.typed_value.key` as well as `cast(a, i64) = 100` -> `cast(cast(a,i32),i64) = 100` -> `a = 100` or is that mixing too many things into the same API? -- 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