influxdata / influxdata/influxdb

Inconsistent Boolean Field Values

Open
#24,971 1 comment 0 reactions 0 assignees View on GitHub

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
![image](https://github.com/influxdata/influxdb/assets/55368451/0b2804b4-e4bc-48e8-b6ee-4ba0fde0c9d0)

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

![image](https://github.com/influxdata/influxdb/assets/55368451/19cf6901-8277-464d-8d21-9799dc6dab47)

__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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.