OR FALSE trigger error
Search before asking
- [x] I searched in the issues and found nothing similar.
Version
2.0.5 (build: 0917050)
Describe the bug and provide the minimal reproduce step
DELETE DATABASE root.min; CREATE DATABASE root.min;
CREATE TIMESERIES root.min.t1.c0 INT64; CREATE TIMESERIES root.min.t1.c2 INT64; CREATE TIMESERIES root.min.t1.c3 DOUBLE;
INSERT INTO root.min.t1(time, c0, c2, c3) VALUES (1641024300000, 1, 2, 111.0);
--query 1 SELECT c2, c0, c3 FROM root.min.t1 WHERE (111.0 = c3) & ((time BETWEEN 1641088367591 AND 1696815489424) | (time IN (1659164962649))) AND (time BETWEEN 1641024265420 AND 1641024393069);
-- query 2 SELECT c2, c0, c3 FROM root.min.t1 WHERE ((111.0 = c3) & ((time BETWEEN 1641088367591 AND 1696815489424) | (time IN (1659164962649)))) AND (time BETWEEN 1641024265420 AND 1641024393069) OR FALSE;
What did you expect to see?
query 1: return empty set
query 2: return empty set
What did you see instead?
query 1: return empty set
query 2: return error
Anything else?
No response
Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
SELECT c2, c0, c3 FROM root.min.t1 WHERE ((111.0 = c3) & ((time BETWEEN 1641088367591 AND 1696815489424) | (time IN (1659164962649)))) AND (time BETWEEN 1641024265420 AND 1641024393069) OR FALSE;
The OR FALSE at the tail can be removed, but rewriting is not currently supported, can try OR 1!=1