-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimization rule filter_push_down
causes FieldNotFound
error
#4401
Comments
Thank you for the report @ZuoTiJia cc @jackwener I wonder if #4365 will fix this issue |
Look like the rule is right
I think it's caused by that filter can't eval expression pg:
-- create
CREATE TABLE t (
column1 TIMESTAMP PRIMARY KEY
);
-- insert
INSERT INTO t VALUES ('2022-11-28T18:00:00');
-- fetch
select * from t where date_trunc('day', column1) is not null; is ok CREATE TABLE t AS VALUES (TIMESTAMP '2022-11-28T18:00:00');
select * from t where date_trunc('day', column1) is not null; failed. |
I think I can make a temporary solution that only allows pushing down when it is a When we support expression eval in filter, we can rollback. |
I wonder if there is something wrong with our HAVING clause support Specifically, it look like SELECT date_trunc('day', column1) AS day FROM t GROUP BY day HAVING date_trunc('day', column1) IS NOT NULL; Is treating |
I think it is bug of @jackwener Could you please confirm? |
😂 My mistake, it actually is a bug, |
I have fix it, I don't prepare to mix it into #4365. |
I 100% agree -- thank you @jackwener |
Describe the bug
Optimization rule
filter_push_down
causesFieldNotFound
errorTo Reproduce
Error displayed
Expected behavior
When I delete the optimization rule
filter_push_down
, the statement executes normally.Here is the log about filter_push_down. I added some descriptions about the
Expr
type.The text was updated successfully, but these errors were encountered: