bowenliang123 commented on code in PR #4257:
URL: https://github.com/apache/kyuubi/pull/4257#discussion_r1098387068


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/TableCommands.scala:
##########
@@ -410,6 +410,26 @@ object TableCommands {
     TableCommandSpec(cmd, Seq(tableDesc), DESCTABLE)
   }
 
+  val DescribeRelationTable = {
+    val cmd = "org.apache.spark.sql.catalyst.plans.logical.DescribeRelation"
+    val columnDesc = ColumnDesc("partitionSpec", 
classOf[PartitionColumnExtractor])
+    val tableDesc = TableDesc(
+      "relation",
+      classOf[ResolvedTableTableExtractor],
+      Some(columnDesc),
+      isInput = true,
+      setCurrentDatabaseIfMissing = true)
+    TableCommandSpec(cmd, Seq(tableDesc), DESCTABLE)

Review Comment:
   You could put multiple table specs for different spark version when 
constructing the TableCommandSpec here rather than separate it into two 
different commands. They then will be used one by one in PriviligeBuilder to 
extract tables from the command.
   ```
         case classname if TABLE_COMMAND_SPECS.contains(classname) =>
           val spec = TABLE_COMMAND_SPECS(classname)
           spec.tableDescs.foreach { td =>
   ```



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