You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/09/01 07:36:58 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #3375] [AUTHZ] Support Arctic custom plan node ReplaceArcticData
This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 7aa556dbe [KYUUBI #3375] [AUTHZ] Support Arctic custom plan node ReplaceArcticData
7aa556dbe is described below
commit 7aa556dbe57616f8c6a0df95524974ef960e56c0
Author: jinsilei <ji...@corp.netease.com>
AuthorDate: Thu Sep 1 15:36:48 2022 +0800
[KYUUBI #3375] [AUTHZ] Support Arctic custom plan node ReplaceArcticData
### _Why are the changes needed?_
Ranger adapter Arctic update sql
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3375 from hellojinsilei/feature-ranger-arctic.
Closes #3375
c60d72f9 [jinsilei] fix arctic ranger
53458f4c [jinsilei] add arctic rabger
Authored-by: jinsilei <ji...@corp.netease.com>
Signed-off-by: Kent Yao <ya...@apache.org>
---
.../apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala
index c1ca8999e..5665e6129 100644
--- a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala
+++ b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala
@@ -517,6 +517,18 @@ object PrivilegesBuilder {
val databases = getFieldVal[Seq[String]](resolvedNamespace, "namespace")
outputObjs += databasePrivileges(quote(databases))
+ case "ReplaceArcticData" =>
+ val relation = getPlanField[Any]("table")
+ val identifier = getFieldVal[AnyRef](relation, "identifier")
+ val namespace = invoke(identifier, "namespace").asInstanceOf[Array[String]]
+ val table = invoke(identifier, "name").asInstanceOf[String]
+ outputObjs += PrivilegeObject(
+ TABLE_OR_VIEW,
+ PrivilegeObjectActionType.UPDATE,
+ quote(namespace),
+ table,
+ Nil)
+
case _ =>
// AddArchivesCommand
// AddFileCommand