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/04/21 14:46:11 UTC

[GitHub] [incubator-kyuubi] packyan opened a new issue, #2438: [Improvement] Shall We Add a SparkSession In AccessResource?

packyan opened a new issue, #2438:
URL: https://github.com/apache/incubator-kyuubi/issues/2438

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the [issues](https://github.com/apache/incubator-kyuubi/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### What would you like to be improved?
   
   The current constructor of AccessResource is :
   ```scala
   object AccessResource {
     def apply(
         objectType: ObjectType,
         firstLevelResource: String,
         secondLevelResource: String,
         thirdLevelResource: String) {
       ...
     }
   }
   ```
   In some cases, firstLevelResource maybe null, for example, in spark 2.4,`DESCRIBE TABLE table_name`, will produce a `DescribeTableCommand` without database info, so the correspnding AccessResource's `firstLevelResource` is null. Then it will generate a invaild RangerRequest, because of the databasse field is null.
   
   I'm not sure that when the database is not explicitly specified in the sql statement, there will be other commands without database information.
   
   ### How should we improve?
   
   Therefore, I think we should add a sparksession in AccessResource, in the case of databasse is null. When the `firstLevelResource` is null or empty, get `firstLevelResource` from catalog's current database.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a 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.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


[GitHub] [incubator-kyuubi] yaooqinn commented on issue #2438: [Improvement] Shall We Add a SparkSession for AccessResource in SparkSQL Authz?

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on issue #2438:
URL: https://github.com/apache/incubator-kyuubi/issues/2438#issuecomment-1105425650

   we shall use currentdb case by case


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


[GitHub] [incubator-kyuubi] yaooqinn commented on issue #2438: [Improvement] Shall We Add a SparkSession for AccessResource in SparkSQL Authz?

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on issue #2438:
URL: https://github.com/apache/incubator-kyuubi/issues/2438#issuecomment-1106529957

   The DescribeTableCommand supports both temp view, permanent view, and table. we can use the current db directly for the temp view. we seem can do nothing if the spark does not pass the database part into this command.


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


[GitHub] [incubator-kyuubi] packyan commented on issue #2438: [Improvement] Shall We Add a SparkSession In AccessResource?

Posted by GitBox <gi...@apache.org>.
packyan commented on issue #2438:
URL: https://github.com/apache/incubator-kyuubi/issues/2438#issuecomment-1105320722

   cc @yaooqinn 


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