Skip to content

branch-4.1: [fix](nereids) Make role-mapping keywords RULE/CEL/MAPPING non-reserved#64105

Merged
yiguolei merged 1 commit into
apache:branch-4.1from
CalvinKirs:rolemapping-keyword-branch-4.1
Jun 5, 2026
Merged

branch-4.1: [fix](nereids) Make role-mapping keywords RULE/CEL/MAPPING non-reserved#64105
yiguolei merged 1 commit into
apache:branch-4.1from
CalvinKirs:rolemapping-keyword-branch-4.1

Conversation

@CalvinKirs
Copy link
Copy Markdown
Member

@CalvinKirs CalvinKirs requested a review from yiguolei as a code owner June 4, 2026 04:28
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@CalvinKirs
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@CalvinKirs CalvinKirs force-pushed the rolemapping-keyword-branch-4.1 branch from 45085f5 to 425e0b0 Compare June 4, 2026 06:29
The 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.
@CalvinKirs CalvinKirs force-pushed the rolemapping-keyword-branch-4.1 branch from 425e0b0 to e58761a Compare June 4, 2026 06:39
@CalvinKirs
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/85) 🎉
Increment coverage report
Complete coverage report

2 similar comments
@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/85) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/85) 🎉
Increment coverage report
Complete coverage report

@yiguolei yiguolei merged commit 8581881 into apache:branch-4.1 Jun 5, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants