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 d8f031a9fc [KYUUBI #6941] Test Add new Column for paimon
d8f031a9fc is described below

commit d8f031a9fc5106d46a747f122776b145434da308
Author: davidyuan <[email protected]>
AuthorDate: Mon Mar 17 16:25:26 2025 +0800

    [KYUUBI #6941] Test Add new Column for paimon
    
    ### Why are the changes needed?
    
    Cuurently, ranger check test case missing check paimon add new column 
command, add it.
    #6941
    
    ### How was this patch tested?
    
    Test Add New Column for paimin with ranger
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    This patch had conflicts when merged, resolved by
    Committer: Cheng Pan <[email protected]>
    
    Closes #6945 from davidyuan1223/test_add_new_column_for_paimon.
    
    Closes #6941
    
    f865e132a [davidyuan] test add new column
    
    Authored-by: davidyuan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../PaimonCatalogRangerSparkExtensionSuite.scala      | 19 +++++++++++++++++++
 1 file changed, 19 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 991b0165d9..12478cccc9 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
@@ -255,6 +255,25 @@ class PaimonCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
     }
   }
 
+  test("Add New Column") {
+    withCleanTmpResources(Seq(
+      (s"$catalogV2.$namespace1.$table1", "table"))) {
+      val createTable = createTableSql(namespace1, table1)
+      doAs(admin, sql(createTable))
+      val alterTableSql =
+        s"""
+           |ALTER TABLE $catalogV2.$namespace1.$table1
+           |ADD COLUMNS (
+           |  city STRING
+           |)
+           |""".stripMargin
+      interceptEndsWith[AccessControlException] {
+        doAs(someone, sql(alterTableSql))
+      }(s"does not have [alter] privilege on [$namespace1/$table1]")
+      doAs(admin, sql(alterTableSql))
+    }
+  }
+
   test("Adding Column Position") {
     withCleanTmpResources(Seq(
       (s"$catalogV2.$namespace1.$table1", "table"))) {

Reply via email to