pan3793 commented on code in PR #6634:
URL: https://github.com/apache/kyuubi/pull/6634#discussion_r1724292723


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala:
##########
@@ -52,10 +52,15 @@ object TableExtractor {
    * @return owner
    */
   def getOwner(v: AnyRef): Option[String] = {
-    // org.apache.spark.sql.connector.catalog.Table
-    val table = invokeAs[AnyRef](v, "table")
-    val properties = invokeAs[JMap[String, String]](table, 
"properties").asScala
-    properties.get("owner")
+    try {
+
+      // org.apache.spark.sql.connector.catalog.Table
+      val table = invokeAs[AnyRef](v, "table")
+      val properties = invokeAs[JMap[String, String]](table, 
"properties").asScala
+      properties.get("owner")
+    } catch {
+      case _: Throwable => None

Review Comment:
   should we at least log something at the debug level?



##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala:
##########
@@ -69,7 +74,7 @@ object TableExtractor {
       getOwner(table)
     } catch {
       // Exception may occur due to invalid reflection or table not found
-      case _: Exception => None
+      case _: Throwable => None

Review Comment:
   ditto



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