influxdata / influxdata/influxdb
limit() function skips offset records when date changes
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
__Steps to reproduce:__
1. Prepare 30 day data for 5 records each.
2. from(bucket: "db/30days")
\|> range(start:2021-02-24T00:00:00.0000000Z)
\|> filter(fn: (r) => (r._measurement == "table1"))
\|> limit(n:32, offset:1)
__Expected behavior:__
Skip first record only.
__Actual behavior:__
Skip first record and first record for each day.
__Environment info:__
*InfluxDB v1.8.4 (git: 1.8 bc8ec4384eed25436d31045f974bf39f3310fa3c)
*InfluxDB 2.0.4 (git: 4e7a59bb9a) build_date: 2021-02-08T17:47:02Z
Contributor guide
Research direction
Run the supplied query against the listed InfluxDB versions and confirm how limit(n:32, offset:1) behaves when records span multiple days. Trace the limit operation to determine why an extra record is skipped at each date boundary; done means only the first record is skipped.
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
- Mostly clear
- Newbie friendliness
- 35/100