You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "yaooqinn (via GitHub)" <gi...@apache.org> on 2023/02/28 02:29:24 UTC

[GitHub] [kyuubi] yaooqinn commented on a diff in pull request #4427: Simplify assertions in Authz tests in declarative style

yaooqinn commented on code in PR #4427:
URL: https://github.com/apache/kyuubi/pull/4427#discussion_r1119512230


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/SparkSessionProvider.scala:
##########
@@ -71,23 +75,78 @@ trait SparkSessionProvider {
 
   protected val sql: String => DataFrame = spark.sql
 
-  protected def doAs[T](user: String, f: => T): T = {
+  protected def doAs[T](user: String)(f: => T): T = {
     UserGroupInformation.createRemoteUser(user).doAs[T](
       new PrivilegedExceptionAction[T] {
         override def run(): T = f
       })
   }
+
+  protected def runSqlAs(user: String)(

Review Comment:
   +1



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