packyan commented on code in PR #2623:
URL: https://github.com/apache/incubator-kyuubi/pull/2623#discussion_r880423020


##########
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:
   > 
   
   sorry, only consider the spark2.x, the support for spark3.x multi-catalog is 
committed, please review it, thx.



-- 
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]

Reply via email to