ZuoTiJia opened a new issue, #4401:
URL: https://github.com/apache/arrow-datafusion/issues/4401
**Describe the bug**
Optimization rule `filter_push_down` causes `FieldNotFound` error
**To Reproduce**
```sql
CREATE TABLE t AS VALUES (TIMESTAMP '2022-11-28T18:00:00');
SELECT date_trunc('day', column1) AS day FROM t GROUP BY day HAVING day IS
NOT NULL;
SELECT date_trunc('day', column1) AS day FROM t GROUP BY day HAVING
date_trunc('day', column1) IS NOT NULL;
```
Error displayed
```
SchemaError(FieldNotFound { field: Column { relation: None, name:
"datetrunc(Utf8(\"day\"),t.column1)" }, valid_fields: Some([Column { relation:
Some("t"), name: "column1" }]) })
```
**Expected behavior**
When I delete the optimization rule `filter_push_down`, the statement
executes normally.
```
+---------------------+
| day |
+---------------------+
| 2022-11-28T00:00:00 |
+---------------------+
```
--
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]