Uh oh!
There was an error while loading. Please reload this page.
[fix](nereids) Make role-mapping keywords RULE/CEL/MAPPING non-reserved - #64104
Conversation
hello-stephen
commented
Jun 4, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
CalvinKirs
commented
Jun 4, 2026
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
a0648ba to
5e04d29CompareThe role-mapping DDL added the keywords RULE, CEL and MAPPING to the lexer but did not add them to the `nonReserved` rule, so they became reserved words. Common SQL that uses them as identifiers, e.g. `INSERT INTO t(..., RULE, ...)`, started failing with "mismatched input 'RULE'". Add the three keywords to `nonReserved`. They only appear in fixed, non-ambiguous positions (`RULE (`, `USING CEL`, `CREATE/DROP ROLE MAPPING`), so the grammar stays unambiguous: verified with ANTLR LL_EXACT_AMBIG_DETECTION reporting zero ambiguities and correct routing of `CREATE ROLE MAPPING ...` vs `CREATE ROLE <name>`. Add unit tests in RoleMappingParserTest and an end-to-end regression case test_role_mapping_keyword.
5e04d29 to
808ef4aCompareCalvinKirs
commented
Jun 4, 2026
run buildall |
hello-stephen
commented
Jun 4, 2026
FE UT Coverage ReportIncrement line coverage `` 🎉 |
hello-stephen
commented
Jun 4, 2026
FE Regression Coverage ReportIncrement line coverage |
hello-stephen
commented
Jun 4, 2026
TPC-H: Total hot run time: 29629 ms |
hello-stephen
commented
Jun 4, 2026
TPC-DS: Total hot run time: 169805 ms |
CalvinKirs
commented
Jun 5, 2026
run nonConcurrent |
CalvinKirs
commented
Jun 5, 2026
/review |
There was a problem hiding this comment.
I found regression-test standard issues that should be fixed before merge. The grammar change itself is small and focused, and the FE parser unit coverage exercises both identifier usage and role-mapping DDL ambiguity. No additional user-provided focus points were specified.
Critical checkpoint conclusions:
- Goal/test: The goal appears to be making RULE/CEL/MAPPING non-reserved in Nereids. The grammar change accomplishes that, and FE parser coverage is present. The new regression test needs to follow repository regression-test output standards.
- Scope: The parser change is minimal and focused.
- Concurrency/lifecycle/config/compatibility: No concurrency, lifecycle, new config, persistence, FE-BE protocol, or storage-format compatibility concerns found.
- Parallel paths: This PR updates Nereids grammar; I did not find another changed parser path in the actual GitHub PR diff.
- Testing: Coverage targets the right behavior, but the regression case uses inline asserts for deterministic query results and drops the table after the test, both contrary to AGENTS.md regression-test rules.
- Observability/performance/data correctness: No new runtime observability, performance, transaction, or data-visibility concerns found for this parser-only change.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
PR approved by at least one committer and no changes requested. |
hello-stephen
commented
Jun 5, 2026
FE Regression Coverage ReportIncrement line coverage |
Uh oh!
There was an error while loading. Please reload this page.
#61819
The role-mapping DDL added the keywords RULE, CEL and MAPPING to the lexer but did not add them to the
nonReservedrule, so they became reserved words. Common SQL that uses them as identifiers, e.g.INSERT INTO t(..., RULE, ...), started failing with "mismatched input 'RULE'".Add the three keywords to
nonReserved. They only appear in fixed, non-ambiguous positions (RULE (,USING CEL,CREATE/DROP ROLE MAPPING), so the grammar stays unambiguous: verified with ANTLR LL_EXACT_AMBIG_DETECTION reporting zero ambiguities and correct routing ofCREATE ROLE MAPPING ...vsCREATE ROLE <name>.Add unit tests in RoleMappingParserTest and an end-to-end regression case test_role_mapping_keyword.