bowenliang123 commented on code in PR #6634:
URL: https://github.com/apache/kyuubi/pull/6634#discussion_r1724322878
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala:
##########
@@ -52,10 +53,16 @@ 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 e: Throwable =>
+ logError("Extract owner from table failed.", e)
Review Comment:
How about logging on debug level? The owner is an optional thing.
--
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]