heguanhui commented on code in PR #63631:
URL: https://github.com/apache/doris/pull/63631#discussion_r3336414747


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/DropRowPolicyCommand.java:
##########
@@ -70,16 +70,19 @@ public void doRun(ConnectContext ctx, StmtExecutor 
executor) throws Exception {
      * validate
      */
     public void validate(ConnectContext ctx) throws AnalysisException {
-        tableNameInfo.analyze(ctx.getNameSpaceContext());
-        if (user != null) {
-            user.analyze();
-        }
         // check auth
         if (!Env.getCurrentEnv().getAccessManager()
                 .checkGlobalPriv(ConnectContext.get(), PrivPredicate.GRANT)) {
             
ErrorReport.reportAnalysisException(ErrorCode.ERR_SPECIFIC_ACCESS_DENIED_ERROR,
                     PrivPredicate.GRANT.getPrivs().toString());
         }
+        tableNameInfo.analyze(ctx.getNameSpaceContext());
+        if (user != null) {

Review Comment:
   Thanks for pointing this out. Stale policies for deleted role/user is a 
separate issue [https://github.com/apache/doris/pull/63313](url) which I've 
already fixed in another PR (cascade-deleting associated row policies on 
role/user drop), so the role existence check here is valid.



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