zddr commented on code in PR #22629:
URL: https://github.com/apache/doris/pull/22629#discussion_r1287226237


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/PrivPredicate.java:
##########
@@ -110,6 +110,18 @@ public Operator getOp() {
         return op;
     }
 
+    // Determine which column Privilege correspond to PrivPredicate
+    //The current logic is to include a SELECT_ PRIV returns SELECT_ PRIV, if 
load is included_ PRIV returns LOAD_ PRIV,
+    // the order cannot be reversed
+    public Privilege getColPrivilege() {
+        if (privs.get(Privilege.SELECT_PRIV.getIdx())) {
+            return Privilege.SELECT_PRIV;
+        } else if (privs.get(Privilege.LOAD_PRIV.getIdx())) {
+            return Privilege.LOAD_PRIV;
+        }
+        return null;

Review Comment:
   return Optional



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to