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

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

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


##########
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:
   I think it's kind of over-engineering, which increases the onboarding costs for new developer



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