[Bug] DUMP keyword cannot be used as an identifier
- Dominant language
- Java
- Stars
- 15.9k
- Forks
- 3.9k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 520
Description
`DUMP` is a lexer keyword used by `PLAN REPLAYER DUMP`, but it was never added to the `nonReserved` list in the Nereids grammar. As a result, `dump` cannot be used as an ordinary identifier — e.g. a column, table, alias, or CTE named `dump` fails to parse:
```sql
SELECT dump FROM t; -- parse error
SELECT 1 AS dump FROM t; -- parse error
```
In older versions (e.g. 2.1) `dump` worked as an identifier, so this is a backward-compatibility regression for users who have objects named `dump`. `DUMP` should be a non-reserved keyword.
Contributor guide
Research direction
Locate the Nereids grammar's nonReserved list and the lexer rule used by PLAN REPLAYER DUMP. Verify the existing SELECT examples and related parser tests, if present; done means DUMP remains usable for PLAN REPLAYER DUMP while dump parses as a column, table, alias, and CTE identifier.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100