apache / apache/doris

[Bug] DUMP keyword cannot be used as an identifier

Open Beginner friendly
#65,252 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.