influxdata / influxdata/influxdb
Inconsistent Boolean Field Values
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
**Problem statement**
I have two queries where the only difference between the queries is Query 2 has a narrower time range than Query 1. Note that Query 2's timerange is still captured by Query 1.
Given the above info, both my queries are showing different values for my Boolean field called _'omit'_ which is super strange. I expect Query 1's result to be exactly equal to Query 2's result for Query 2's timestamps.
__Steps to reproduce:__
1. Query a table with a Boolean field with a wide timerange from t1 to t2.
2. Make the same query but this time with a narrower time range but still within t1 and t2.
3. Compare the results of the Boolean field.
here is my Query 1 along with it's result:
```
SELECT var1, omit
FROM "bucket".."table"
WHERE time >= '2024-03-18T16:00:00Z' and time <= '2024-04-01T13:52:00Z' and id = 'abcdef'
```
**Query 1 Result:**
the _omit_ field takes values false for 04/01/2024 13:49:00 and 04/01/2024 13:51:00

here is my Query 2 along with it's result:
```
SELECT var1, omit
FROM "bucket".."table"
WHERE time >= '2024-04-01T113:42:00Z' and time <= '2024-04-01T13:52:00Z' and id = 'abcdef'
```
**Query 2 Result:**
the _omit_ field takes values true for 04/01/2024 13:49:00 and 04/01/2024 13:51:00

__Expected behaviour:__
I expected to see the same values for the Boolean field.
__Actual behaviour:__
I saw the omit field to be False in Query 1 and true in Query 2 for timestamps: 04/01/2024 13:49:00 and 04/01/2024 13:51:00. Therefore, these query results are inconsistent.
__Environment info:__
* InfluxDB 2.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is identified in the report. Start by reproducing the two SQL queries against InfluxDB 2.7 and compare the Boolean values for the overlapping timestamps; done means the same records return the same omit values for both time ranges.
Written by the indexing model from the issue text.
Assessment
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100