You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/11/28 04:21:16 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #3859] [Bug] Error when authz command ReplaceArcticData
This is an automated email from the ASF dual-hosted git repository.
chengpan 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 40e64f014 [KYUUBI #3859] [Bug] Error when authz command ReplaceArcticData
40e64f014 is described below
commit 40e64f014bb28a4a094c81c069a18e036ce6865c
Author: zhouyifan279 <zh...@gmail.com>
AuthorDate: Mon Nov 28 12:21:05 2022 +0800
[KYUUBI #3859] [Bug] Error when authz command ReplaceArcticData
### _Why are the changes needed?_
Fix #3858
### _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
- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3859 from zhouyifan279/3858.
Closes #3859
af5d7e56 [zhouyifan279] [Bug] Error when authz command ReplaceArcticData
5d54eb91 [zhouyifan279] [Bug] Error when authz command ReplaceArcticData
Authored-by: zhouyifan279 <zh...@gmail.com>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilder.scala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 0862a4d70..4c1f82163 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
@@ -580,10 +580,10 @@ object PrivilegesBuilder {
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]
- val owner = getTableOwnerFromV2Plan(relation, identifier.asInstanceOf[Identifier])
+ val identifier = getFieldVal[Option[Identifier]](relation, "identifier")
+ val namespace = invoke(identifier.get, "namespace").asInstanceOf[Array[String]]
+ val table = invoke(identifier.get, "name").asInstanceOf[String]
+ val owner = getTableOwnerFromV2Plan(relation, identifier.get)
outputObjs += PrivilegeObject(
TABLE_OR_VIEW,
PrivilegeObjectActionType.UPDATE,