influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

Field values become ineffective when compared to unsigned integers in the Where clause

Open LingweiKuang opened this issue 1 year ago • 0 comments

Dear InfluxDB Team, I have a bug that I need to report to you.

Steps to reproduce

In the latest version of InfluxDB, if we have an organization named "organization", we can use the Influx client to execute the following commands to create a bucket and write the specified data into that bucket.

influx bucket delete --name db0
influx bucket create --name db0 --org organization

influx write \
  --bucket db0 \
  --precision s "
t0,t0_tag0=initTag t0_f0=0u 1641024000
t0,t0_tag0=initTag t0_f0=1u 1641024001
t0,t0_tag1=initTag t0_f0=0u 1641024000"

Next, we use the Influx v1 shell command to enter the Influx shell backend and execute three types of query statements:

# query 1
select * from db0.autogen.t0

# query 2
select * from db0.autogen.t0 where (1u) < (100000u)

# query 3
select * from db0.autogen.t0 where t0_f0 < 100000u

Expected behaviour

The above queries should be able to retrieve all the data.

Actual behaviour

Query 1 and Query 2 can retrieve all the data, but Query 3 returns "No Results". When field values are compared with unsigned integers in the Where clause, it becomes ineffective. Could this be regarded as a logical issue?

Environment info

Influx CLI dev (git: none) build_date: 2023-04-28T14:24:14Z

InfluxDB OSS v2.7.10 (git: f302d97)

Linux 5.15.0-94-generic x86_64

LingweiKuang avatar Oct 11 '24 01:10 LingweiKuang