bowenliang123 commented on code in PR #3425:
URL: https://github.com/apache/incubator-kyuubi/pull/3425#discussion_r966850577
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/util/AuthZUtils.scala:
##########
@@ -98,14 +109,14 @@ private[authz] object AuthZUtils {
plan.nodeName == "DataSourceV2Relation" && plan.resolved
}
- def getDatasourceV2Identifier(plan: LogicalPlan): Option[TableIdentifier] = {
- // avoid importing DataSourceV2Relation for Spark version compatibility
- val identifier = getFieldVal[Option[AnyRef]](plan, "identifier")
- identifier.map { id =>
- val namespaces = invoke(id, "namespace").asInstanceOf[Array[String]]
- val table = invoke(id, "name").asInstanceOf[String]
- TableIdentifier(table, Some(quote(namespaces)))
- }
+ def getDatasourceV2Identifier(plan: LogicalPlan): Option[Identifier] = {
+ getFieldVal[Option[Identifier]](plan, "identifier")
+ }
+
+ def getTableIdentifierFromIdentifier(id: Identifier): TableIdentifier = {
+ val namespaces = invoke(id, "namespace").asInstanceOf[Array[String]]
Review Comment:
ok, it's a legacy usage from 1.6.0. let me fix it.
--
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]