zml1206 commented on code in PR #5666:
URL: https://github.com/apache/kyuubi/pull/5666#discussion_r1389236527
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegeObject.scala:
##########
@@ -66,14 +66,18 @@ object PrivilegeObject {
table: Table,
columns: Seq[String] = Nil,
actionType: PrivilegeObjectActionType =
PrivilegeObjectActionType.OTHER): PrivilegeObject = {
- new PrivilegeObject(
- TABLE_OR_VIEW,
- actionType,
- table.database.orNull,
- table.table,
- columns,
- table.owner,
- table.catalog)
+ if (table.table.contains("/")) {
Review Comment:
To determine whether it is a path-based table, I can refer to the
implementation of delta lake.
But add a new UriDesc to the command should do it when needed, e.g. OPTIMIZE
'path', otherwise the match will be repeated. What do you think?
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegeObject.scala:
##########
@@ -66,14 +66,18 @@ object PrivilegeObject {
table: Table,
columns: Seq[String] = Nil,
actionType: PrivilegeObjectActionType =
PrivilegeObjectActionType.OTHER): PrivilegeObject = {
- new PrivilegeObject(
- TABLE_OR_VIEW,
- actionType,
- table.database.orNull,
- table.table,
- columns,
- table.owner,
- table.catalog)
+ if (table.table.contains("/")) {
Review Comment:
To determine whether it is a path-based table, I can refer to the
implementation of delta lake.
But add a new UriDesc to the command should do it when needed, e.g. OPTIMIZE
'path', otherwise the match will be repeated. What do you think?
--
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]