databend
databend copied to clipboard
bug: timestamp sub-query filter condition doesn't push down
Search before asking
- [X] I had searched in the issues and found no similar issues.
Version
v1.2.307
What's Wrong?
timestamp sub-query filter condition doesn't push down
How to Reproduce?
CREATE TABLE date_sub_query_test (
ID BIGINT NULL,
test_time timestamp NULL
)
insert into date_sub_query_test values(1,'2024-03-19 00:00:00'); insert into date_sub_query_test values(2,'2024-03-19 01:00:00'); insert into date_sub_query_test values(3,now());
explain select * from date_sub_query_test where test_time >= (select now());
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
You can change the predicate to test_time >= now() to solve this issue, we will optimize this syntax in the future https://github.com/datafuselabs/databend/issues/15020.