yaooqinn commented on code in PR #2623:
URL: https://github.com/apache/incubator-kyuubi/pull/2623#discussion_r869414308
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/ranger/AccessResource.scala:
##########
@@ -40,11 +41,20 @@ object AccessResource {
def apply(
objectType: ObjectType,
- firstLevelResource: String,
+ firstLevelResourceOrNull: String,
secondLevelResource: String,
- thirdLevelResource: String): AccessResource = {
+ thirdLevelResource: String,
+ spark: SparkSession = null): AccessResource = {
val resource = new AccessResource(objectType)
+ val firstLevelResource =
+ if (spark != null
+ && (firstLevelResourceOrNull == null ||
firstLevelResourceOrNull.isEmpty)) {
+ spark.catalog.currentDatabase
Review Comment:
why session catalog?how about other catalog implementations
--
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]