Dandandan opened a new issue, #7700:
URL: https://github.com/apache/arrow-datafusion/issues/7700
### Describe the bug
SimplifyExpressions doesn't have access to the entire schema, resulting in
planning errors when the filter can be pushed down entirely to the tablescan.
```
let fields = vec![
Field::new("a", DataType::UInt32, false),
Field::new("b", DataType::UInt32, false),
Field::new("c", DataType::UInt32, false),
];
let schema = Schema::new(fields);
let table_scan = table_scan_with_filters(
Some("test"),
&schema,
Some(vec![0]),
vec![col("b").is_not_null()],
)?
.build()?;
assert_eq!(1, table_scan.schema().fields().len());
assert_fields_eq(&table_scan, vec!["a"]);
let expected = "TableScan: test projection=[a],
full_filters=[Boolean(true) AS b IS NOT NULL]";
assert_optimized_plan_eq(&table_scan, expected)
```
### To Reproduce
_No response_
### Expected behavior
_No response_
### Additional context
_No response_
--
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]