yaooqinn commented on code in PR #5418:
URL: https://github.com/apache/kyuubi/pull/5418#discussion_r1360357986


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/RuleApplyPermanentViewMarker.scala:
##########
@@ -36,7 +37,11 @@ class RuleApplyPermanentViewMarker extends Rule[LogicalPlan] 
{
     plan mapChildren {
       case p: PermanentViewMarker => p
       case permanentView: View if hasResolvedPermanentView(permanentView) =>
-        PermanentViewMarker(permanentView, permanentView.desc)
+        val resolvedSubquery = permanentView.transformAllExpressions {
+          case scalarSubquery: ScalarSubquery =>

Review Comment:
   ```scala
      permanentView.transformAllExpressions {
             case s: ScalarSubquery => 
s.withNewPlan(PermanentViewMarker(s.plan, permanentView.desc))
   
   
   How about we use `PermanentViewMarker` to make it check view privilege? In 
this case,
   
   - we do not need add a new code-branch in PrivilegesBuilder
   - we can fail the subqueries before executing them when view privilege failed
           }
   ```



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