rkrishn7 commented on code in PR #17703:
URL: https://github.com/apache/datafusion/pull/17703#discussion_r2384272903
##########
datafusion/datasource/src/file_scan_config.rs:
##########
@@ -764,24 +751,24 @@ impl FileScanConfig {
eq_properties: &mut EquivalenceProperties,
schema: &Schema,
) -> Result<()> {
- macro_rules! ignore_dangling_col {
- ($col:expr) => {
- if let Some(col) = $col.as_any().downcast_ref::<Column>() {
- if schema.index_of(col.name()).is_err() {
- continue;
+ // Gather valid equality pairs from the filter expression
+ let equal_pairs =
split_conjunction(&filter).into_iter().filter_map(|expr| {
+ // Ignore any binary expressions that reference non-existent
columns in the current schema
+ // (e.g. due to unnecessary projections being removed)
+ reassign_expr_columns(Arc::clone(expr), schema)
+ .ok()
Review Comment:
Yeah `reassign_expr_columns` returns a `Result` and we're filter mapping
over the list of expressions so need to return an Option.
In this case it's okay to discard the result I think (per the comment)
--
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]