This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new ff3da59f63 [KYUUBI #6932] Test ALTER TBLPROPERTIES for Paimon
ff3da59f63 is described below

commit ff3da59f6321aa0e9373e2466f7152959521748f
Author: davidyuan <[email protected]>
AuthorDate: Mon Feb 24 14:31:49 2025 +0800

    [KYUUBI #6932] Test ALTER TBLPROPERTIES for Paimon
    
    ### Why are the changes needed?
    
    AUTHZ Test Add/Change Table properties for PAIMON, check that has support 
the command
    https://github.com/apache/kyuubi/issues/6932
    
    ### How was this patch tested?
    
    Test Add/Change properties SQL
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #6933 from davidyuan1223/test_alter_tableproperties_for_paimin.
    
    Closes #6932
    
    4d64fbf23 [Cheng Pan] Update 
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
    c861a778b [davidyuan] support add/change table properties for paimon
    
    Lead-authored-by: davidyuan <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../PaimonCatalogRangerSparkExtensionSuite.scala   | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git 
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
 
b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
index 841520aeb9..deb65b9a64 100644
--- 
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
+++ 
b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
@@ -121,6 +121,34 @@ class PaimonCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
     }
   }
 
+  test("ALTER TBLPROPERTIES") {
+    withCleanTmpResources(Seq(
+      (s"$catalogV2.$namespace1.$table1", "table"))) {
+      val createTable = createTableSql(namespace1, table1)
+      doAs(admin, sql(createTable))
+      val addTblPropertiesSql =
+        s"""
+           |ALTER TABLE $catalogV2.$namespace1.$table1 SET TBLPROPERTIES(
+           |  'write-buffer-size' = '256 MB'
+           |)
+           |""".stripMargin
+      interceptEndsWith[AccessControlException] {
+        doAs(someone, sql(addTblPropertiesSql))
+      }(s"does not have [alter] privilege on [$namespace1/$table1]")
+      doAs(admin, sql(addTblPropertiesSql))
+      val changeTblPropertiesSql =
+        s"""
+           |ALTER TABLE $catalogV2.$namespace1.$table1 SET TBLPROPERTIES(
+           |  'write-buffer-size' = '128 MB'
+           |)
+           |""".stripMargin
+      interceptEndsWith[AccessControlException] {
+        doAs(someone, sql(changeTblPropertiesSql))
+      }(s"does not have [alter] privilege on [$namespace1/$table1]")
+      doAs(admin, sql(changeTblPropertiesSql))
+    }
+  }
+
   def createTableSql(namespace: String, table: String): String =
     s"""
        |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace.$table

Reply via email to