ulysses-you commented on code in PR #3427:
URL: https://github.com/apache/incubator-kyuubi/pull/3427#discussion_r964380197


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala:
##########
@@ -68,6 +68,16 @@ object PrivilegesBuilder {
     }
   }
 
+  private def isTempView(
+      tableIdent: TableIdentifier,
+      spark: SparkSession): Boolean = {
+    val parts = tableIdent match {
+      case TableIdentifier(table, None) => Seq(table)
+      case TableIdentifier(tblName, Some(dbName)) => Seq(dbName, tblName)

Review Comment:
   it's better to use such code to have a better compatibility:
   ```scala
   tableIdent.database match {
     case Some(db) =>
       Seq(db, tableIdent.table)
     case _ =>
       Seq(tableIdent.table)
   }
   ```
   
   Since the Spark master branch (3.4) will be:
   `TableIdentifier(table: String, database: Option[String], catalog: 
Option[String])`



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