AngersZhuuuu commented on code in PR #5693:
URL: https://github.com/apache/kyuubi/pull/5693#discussion_r1396852615
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala:
##########
@@ -302,6 +303,12 @@ object PrivilegesBuilder {
val inputObjs = new ArrayBuffer[PrivilegeObject]
val outputObjs = new ArrayBuffer[PrivilegeObject]
val opType = plan match {
+ // ExplainCommand run will execute the plan, should avoid check
privilege for the plan.
+ case ExplainCommand(_, _) =>
+ setExplainCommandExecutionId(spark)
+ OperationType.QUERY
Review Comment:
Done
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/rule/Authorization.scala:
##########
@@ -41,6 +42,7 @@ abstract class Authorization(spark: SparkSession) extends
Rule[LogicalPlan] {
object Authorization {
val KYUUBI_AUTHZ_TAG = TreeNodeTag[Unit]("__KYUUBI_AUTHZ_TAG")
+ var KYUUBI_EXPLAIN_COMMAND_EXECUTION_ID =
"KYUUBI_EXPLAIN_COMMAND_EXECUTION_ID"
Review Comment:
Done
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala:
##########
@@ -302,6 +303,12 @@ object PrivilegesBuilder {
val inputObjs = new ArrayBuffer[PrivilegeObject]
val outputObjs = new ArrayBuffer[PrivilegeObject]
val opType = plan match {
+ // ExplainCommand run will execute the plan, should avoid check
privilege for the plan.
+ case ExplainCommand(_, _) =>
Review Comment:
Done
--
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]