AngersZhuuuu commented on code in PR #5482:
URL: https://github.com/apache/kyuubi/pull/5482#discussion_r1366429194


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala:
##########
@@ -240,3 +242,38 @@ class TableTableExtractor extends TableExtractor {
     lookupExtractor[StringTableExtractor].apply(spark, tableName)
   }
 }
+
+class HudiDataSourceV2RelationTableExtractor extends TableExtractor {
+  override def apply(spark: SparkSession, v1: AnyRef): Option[Table] = {
+    val outputObjs = new ArrayBuffer[PrivilegeObject]
+    PrivilegesBuilder.buildQuery(invokeAs[LogicalPlan](v1, "table"), 
outputObjs, spark = spark)

Review Comment:
   > What's the plan here and why we have to use `PrivilegesBuilder.buildQuery` 
here inside calling the `PrivilegesBuilder` ? Sounds bad with possible 
recursion and it's bad for decoupling.
   
   Since here the sourceTable can be a query plan, so use 
`PrivilegeBuilder.buildQuery` is suitable...



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