bowenliang123 commented on code in PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#discussion_r1361840989


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/HudiCatalogRangerSparkExtensionSuite.scala:
##########
@@ -206,4 +206,77 @@ class HudiCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
                |""".stripMargin)))(s"does not have [select] privilege on 
[$namespace1/$table1]")
     }
   }
+
+  test("DropHoodieTableCommand") {
+    withCleanTmpResources(Seq((s"$namespace1.$table1", "table"), (namespace1, 
"database"))) {
+      doAs(admin, sql(s"CREATE DATABASE IF NOT EXISTS $namespace1"))
+      doAs(
+        admin,
+        sql(
+          s"""
+             |CREATE TABLE IF NOT EXISTS $namespace1.$table1(id int, name 
string, city string)
+             |USING HUDI
+             |OPTIONS (
+             | type = 'cow',
+             | primaryKey = 'id',
+             | 'hoodie.datasource.hive_sync.enable' = 'false'
+             |)
+             |PARTITIONED BY(city)
+             |""".stripMargin))
+      interceptContains[AccessControlException](
+        doAs(
+          someone,
+          sql(s"DROP TABLE IF EXISTS $namespace1.$table1".stripMargin)))(
+        s"does not have [drop] privilege on [$namespace1/$table1]")

Review Comment:
   ```suggestion
         interceptContains[AccessControlException] {
           doAs(someone, sql(s"DROP TABLE IF EXISTS 
$namespace1.$table1".stripMargin))
         }(s"does not have [drop] privilege on [$namespace1/$table1]")
   ```
   Change to use "{}" embraces for interceptContains. To make the code more 
compact in style.



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