zclllyybb commented on issue #65252:
URL: https://github.com/apache/doris/issues/65252#issuecomment-4890506055

   Breakwater-GitHub-Analysis-Slot: slot_8000147a675e
   This content is generated by AI for reference only.
   
   Initial triage conclusion: this looks like a valid parser compatibility 
regression, with a narrow and code-backed root cause.
   
   Evidence checked:
   - The live issue has no current comments, labels, assignees, or milestone.
   - On current `upstream/master` (`de5ce1f6594d8cd420c6988a0548eb040205d595`), 
`fe/fe-sql-parser/src/main/antlr4/org/apache/doris/nereids/DorisLexer.g4` 
defines `DUMP: 'DUMP';`.
   - The same parser uses `DUMP` in `EXPLAIN ... DUMP` and `PLAN REPLAYER DUMP 
<query>`.
   - `identifier` routes through `strictIdentifier`, which only accepts 
`IDENTIFIER`, backquoted identifiers, or tokens listed in `nonReserved`.
   - In the current `nonReserved` list, the D-section contains `DUAL` followed 
by `DYNAMIC`; `DUMP` is absent. Therefore an unquoted `dump` is tokenized as 
`DUMP`, but cannot be consumed where an identifier is required.
   - In `2.1.11-rc01`, `DUMP` does not appear as a Nereids lexer keyword, which 
supports the reported backward-compatibility regression: older 2.1-era parsing 
would treat bare `dump` as an ordinary identifier.
   
   Existing fix status:
   - A matching public PR already exists: 
https://github.com/apache/doris/pull/65254.
   - That PR adds `DUMP` to `nonReserved` and adds 
`NereidsParserTest#testParseDumpAsIdentifier`, covering `dump` as a column 
alias, column reference, table alias, qualified reference, function argument, 
CTE name, subquery result column, and also confirming `PLAN REPLAYER DUMP 
SELECT 1` still parses.
   
   Recommended next steps:
   - Review and merge PR #65254 if its CI passes. Its scope matches the 
confirmed root cause.
   - For release/backport decisions, check each target branch by code shape 
rather than version name: affected branches are those where `DUMP: 'DUMP'` 
exists in the Nereids lexer while `DUMP` is missing from `nonReserved`.
   - No runtime profile is needed for root-cause confirmation because this is a 
grammar/token classification issue. If this issue is being reported from a 
specific production release, the missing information is the exact Doris 
version/build or branch so maintainers can decide whether the fix needs 
backporting there.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to