You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/30 03:32:49 UTC
[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #4032: [Authz] Extract catalog for DataSourceRelationV2 in buildQuery and pass catalog of queries and commands to PrivilegeObject
bowenliang123 commented on code in PR #4032:
URL: https://github.com/apache/kyuubi/pull/4032#discussion_r1059228372
##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/PrivilegesBuilderSuite.scala:
##########
@@ -155,15 +161,19 @@ abstract class PrivilegesBuilderSuite extends AnyFunSuite
}
test("CreateDatabaseCommand") {
+ assume(isSparkVersionAtMost("3.2"))
Review Comment:
We add catalog assertion in thi ut.
In spark 3.0-3.2, `CREATE DATABASE` sql is parsed into `CreateDatabaseCommand`, which is v1 command and contains no catalog info . And this ut asserts `catalog` in parsed PviilegeObject is None.
In spark 3.3, the same ddl will is pared into `CreateNamespace` of v2commands instead, and the asserted catalog is extracted by another related ResolvedDBObjectNameDatabaseExtractor with real value from CatalogPlugin. New ut for this case is also added to `V2CommandsPrivilegesSuite.scala` in this PR.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org