Decimal `RANGE` offsets are rejected
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 120
Description
## What happened
Dolt exhibits this behavior: decimal `RANGE` offsets are rejected.
## Environment
Dolt main commit `59fb843bf6a4b653d7c8b6d997a603b10cf279d9` (`dolt version 2.2.3`).
## How to reproduce
```sql
CREATE TABLE t(id INT PRIMARY KEY, k DECIMAL(5,1), v INT);
INSERT INTO t VALUES (1,1.0,10),(2,1.4,20),(3,1.8,30);
SELECT id,
SUM(v) OVER (
ORDER BY k
RANGE BETWEEN 0.5 PRECEDING AND CURRENT ROW
) AS actual
FROM t ORDER BY id;
```
## Expected result
MySQL 8.0.43 accepts the exact decimal `RANGE` offset and returns:
```text
+----+--------+
| id | actual |
+----+--------+
| 1 | 10 |
| 2 | 30 |
| 3 | 50 |
+----+--------+
```
## Actual result
Dolt rejects the statement with a parser syntax error at `0.5`.
The same frame with integer offset `1` succeeds, isolating decimal-offset parsing.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the SQL window-function query from the issue and locating the parser entry point that handles RANGE frame offsets. Compare the decimal-offset path with the working integer-offset path. Done means the statement parses and returns 10, 30, and 50, while existing integer-offset behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100