zml1206 commented on code in PR #5760:
URL: https://github.com/apache/kyuubi/pull/5760#discussion_r1403837169


##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/DeltaCatalogRangerSparkExtensionSuite.scala:
##########
@@ -468,6 +477,95 @@ class DeltaCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
       doAs(admin, sql(vacuumTableSql2))
     })
   }
+
+  test("alter path-based table set properties") {
+    withTempDir(path => {
+      doAs(admin, sql(createPathBasedTableSql(path)))
+      val setPropertiesSql = s"ALTER TABLE delta.`$path`" +
+        s" SET TBLPROPERTIES ('delta.appendOnly' = 'true')"
+      interceptEndsWith[AccessControlException](
+        doAs(someone, sql(setPropertiesSql)))(
+        s"does not have [write] privilege on [[$path, $path/]]")
+      doAs(admin, sql(setPropertiesSql))
+    })
+  }
+
+  test("alter path-based table add columns") {
+    withTempDir(path => {
+      doAs(admin, sql(createPathBasedTableSql(path)))
+      val addColumnsSql = s"ALTER TABLE delta.`$path` ADD COLUMNS (age int)"
+      interceptEndsWith[AccessControlException](
+        doAs(someone, sql(addColumnsSql)))(
+        s"does not have [write] privilege on [[$path, $path/]]")

Review Comment:
   This is how I understand it. The privileges of a path-based table are only 
read and write. alter add column modifies the schema of the table, so write 
privilege is required.



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