InfluxDB logical bug detection

Hi, our lab is currently working on logic error detection for InfluxDB. We are trying to identify some logical anomalies present in time-series databases and then publish related articles. Would you be willing to support our work? Any help would be greatly appreciated!
So far, we have made several attempts on InfluxQL and found unexpected results returned by InfluxDB in queries and tests such as the following:

# create bucket
influx bucket create --org organization --name db0
# write data
influx write \
  --bucket db0 \
  --precision s "
t0,t0_tag0=initTag t0_f0=0i 1641024000
t0,t0_tag0=initTag t0_f0=1i 1641024001
t0,t0_tag1=initTag t0_f0=0i 1641024000"
# query 1
select * from db0.autogen.t0
# query 2
select * from db0.autogen.t0 where (1 != 0) and (t0_tag0 != 'tag')
# query 3
select * from db0.autogen.t0 where true & ((1 != 0) and (t0_tag0 != 'tag'))
# query 4
select * from db0.autogen.t0 where true & true

In the above queries, queries 1, 2, and 4 can retrieve the entire dataset, but query 3 only returns a non-empty dataset for t0_tag0. According to conventional logic, in query 3, the expression ((1 != 0) and (t0_tag0 != 'tag')) should return a Boolean data type. I am not sure if this qualifies as a bug in InfluxDB, so I hope you can help me resolve my doubts. Your assistance would be greatly appreciated. If it does turn out to be a bug, I would appreciate it if you could help assign a bug ID. Your involvement will be our greatest motivation for continuous testing of InfluxDB!

  1. Query 1: select * from db0.autogen.t0
  • This query should retrieve the entire dataset from the t0 measurement in the db0 bucket.
  1. Query 2: select * from db0.autogen.t0 where (1 != 0) and (t0_tag0 != 'tag')
  • This query filters the dataset based on two conditions: 1 != 0 (which is always true) and t0_tag0 != 'tag'. Since the first condition is always true, the result set should be the same as query 1.
  1. Query 3: select * from db0.autogen.t0 where true & ((1 != 0) and (t0_tag0 != 'tag'))
  • This query introduces an additional true condition combined with the logical AND (&) operator. The expression ((1 != 0) and (t0_tag0 != 'tag')) evaluates to a boolean value for each row. However, the logical AND operation with true should not affect the result set because true & true always evaluates to true. It’s unexpected that this query returns a non-empty dataset only for t0_tag0.
  1. Query 4: select * from db0.autogen.t0 where true & true
  • This query should logically be equivalent to query 1 and should return the entire dataset.

This indeed might be a bug. Can you please create an issue?

Thank you!