Offset is not processed correctly
Open
Bug
Feature/Change Description
stale
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
table `foo` has 6 rows; the query:
```sql
SELECT
FLOOR(__time TO DAY) t,
COUNT(1)
FROM ( select * from foo order by __time offset 3 ) f
group by FLOOR(__time TO DAY)
```
return 6 rows; regardless of the `offset` inside the subq
Contributor guide
Research direction
The issue names no files or tests. Reproduce the SQL query against a six-row table, then trace how OFFSET in the ordered subquery is handled; done means the subquery's offset changes the rows seen by the outer grouping query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100