Skip to content

[fix](fe) Add user and role existence check in DropRowPolicyCommand#63628

Closed
heguanhui wants to merge 5 commits into
apache:masterfrom
heguanhui:fix/drop-row-policy-check-user-exist
Closed

[fix](fe) Add user and role existence check in DropRowPolicyCommand#63628
heguanhui wants to merge 5 commits into
apache:masterfrom
heguanhui:fix/drop-row-policy-check-user-exist

Conversation

@heguanhui
Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #63322

Problem Summary: DropRowPolicyCommand does not validate whether the user or role specified in the DROP ROW POLICY statement actually exists. This is inconsistent with CreatePolicyCommand, which checks user existence via doesUserExist() and role existence via doesRoleExist(). Without this validation, a typo in the user or role name could silently match no policy, or the user might mistakenly believe the drop succeeded.

Release note

DROP ROW POLICY now validates that the specified user and role exist, returning an error if they do not. This makes the behavior consistent with CREATE ROW POLICY.

Check List (For Author)

  • Test
    • Unit Test
  • Behavior changed:
    • Yes. DROP ROW POLICY now throws AnalysisException when the specified user or role does not exist, whereas previously it would proceed without validation.
  • Does this need documentation?
    • No.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@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?

@heguanhui heguanhui closed this May 25, 2026
@heguanhui heguanhui deleted the fix/drop-row-policy-check-user-exist branch May 25, 2026 13:51
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.

2 participants