You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This query used to work on InfluxDB 1.3.7:
SELECT * FROM aggregate.aggregate_project WHERE true AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
On InfluxDB 1.4.2, I get:
ERR: invalid condition expression: true
If I remove the 'true AND', I get:
ERR: invalid condition expression: false
If I remove the 'false OR', the query works.
Either the 'true' and 'false' was removed from InfluxDB 1.4.x, or it is broken. I could not find any documentation about this.
In case you are wondering: I am assembling the queries programmatically. There are cases where it is much simpler to just add 'true' or 'false', because then the rest of the query can remain the same.
E.g.:
SELECT * FROM aggregate.aggregate_project WHERE customer='foo' AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
Now I want the same query, but I don't care about the customer. So I insert 'true' instead and therefore I can leave the rest of the query the same.
SELECT * FROM aggregate.aggregate_project WHERE true AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
Such an approach works fine in pretty much all other databases, therefore I expect InfluxDB 1.4.x+ to support this, too, especially since it worked in 1.3.x.
The text was updated successfully, but these errors were encountered:
Hi @jsternberg I have compiled influx from latest branch 1.4 (commit 0dac738) which includes this bug fix and even though,
when querying:
SELECT * from cs_daily_prg_global WHERE time >= 1514419200000000000
I get a result set with some data points returned as expected.
when querying:
SELECT * from cs_daily_prg_global WHERE time >= 1514419200000000000 AND true
I get empty result set. I would expect it will return the same set as above.
when querying:
SELECT * from cs_daily_prg_global WHERE time >= 1514419200000000000 AND 1 = 1
I get ERR: invalid condition expression. I would expect 1 = 1 to be reduced to true
In case you are wondering: We have created numerous Grafana dashboards based on Influx DB 1.2/3 and we have used this literal binary expression evaluation within InfluxQL to reduce the amount of queries needed for each Grafana Panel when using multiple template variables.
Bug report
System info: InfluxDB 1.4.2 on Ubuntu 16.04
Steps to reproduce:
This query used to work on InfluxDB 1.3.7:
SELECT * FROM aggregate.aggregate_project WHERE true AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
On InfluxDB 1.4.2, I get:
ERR: invalid condition expression: true
If I remove the 'true AND', I get:
ERR: invalid condition expression: false
If I remove the 'false OR', the query works.
Either the 'true' and 'false' was removed from InfluxDB 1.4.x, or it is broken. I could not find any documentation about this.
In case you are wondering: I am assembling the queries programmatically. There are cases where it is much simpler to just add 'true' or 'false', because then the rest of the query can remain the same.
E.g.:
SELECT * FROM aggregate.aggregate_project WHERE customer='foo' AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
Now I want the same query, but I don't care about the customer. So I insert 'true' instead and therefore I can leave the rest of the query the same.
SELECT * FROM aggregate.aggregate_project WHERE true AND (false OR product = 'fooproduct:v1') AND time >= 1510614000000000000
Such an approach works fine in pretty much all other databases, therefore I expect InfluxDB 1.4.x+ to support this, too, especially since it worked in 1.3.x.
The text was updated successfully, but these errors were encountered: