influxdb
influxdb copied to clipboard
ERR: invalid time comparison operator: !=
Dear Influx-Team,
I run into following issue:
Steps to reproduce:
I'm using Influx 1.8.
The documentation lists != as valid operator (https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/#time-syntax)
When I run a simple query, e.g.
SELECT * FROM "sensors" WHERE time >= '2022-08-30 22:00:00' AND time <= '2022-08-30 23:59:59' AND time != '2022-08-30 22:59:59'
I get: ERR: invalid time comparison operator: !=
I could try to add some sample data if required.
Expected behavior: I would expect Influx to return the queried time range without the specified time stamp
Actual behavior: I get: ERR: invalid time comparison operator: !=
Environment info:
- System info: Linux 5.19.0-1022-aws x86_64
- InfluxDB version: InfluxDB v1.8.10 (git: 1.8 688e697c51fd)
- Other relevant environment details: Container runtime, disk info, etc
@jdstrand @davidby-influx Is that to be fixed in any future?
The time comparison syntax is poorly documented, and there are current limitations on which operators are supported.
In the time range section of the WHERE cause, the not equals operators are not supported, though they may be used with time values in other contexts.
You can se in the source code in this function that the not equals operators cannot be used in a time range.
This is unlikely to change.
There is a discussion of the limitations of time-based expressions here that may be useful to you.
<> Also does not work. Another issue is that condition time > 'xxx' OR time < 'xxx' Does not work (tried to workaround !=, <>)
пн, 13 трав. 2024 р., 17:40 користувач davidby-influx < @.***> пише:
Please try the <> operator instead.
— Reply to this email directly, view it on GitHub https://github.com/influxdata/influxdb/issues/24187#issuecomment-2108049062, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADHJPJHSRLLCO5SQPT5KWZDZCDNGRAVCNFSM6AAAAAAWVWWK7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGA2DSMBWGI . You are receiving this because you commented.Message ID: @.***>