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 65d4b33e3a [KYUUBI #6948] Test Changing Column Comment
65d4b33e3a is described below

commit 65d4b33e3a3c42094bed7f9446f751111f80cff5
Author: davidyuan <[email protected]>
AuthorDate: Thu Mar 6 22:50:05 2025 +0800

    [KYUUBI #6948] Test Changing Column Comment
    
    ### Why are the changes needed?
    
    Range check Test case missing paimon changing column comment, add the test 
case
    #6948
    
    ### How was this patch tested?
    
    Test Ranger check with paimon changing column comment command
    
    ### 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 #6953 from davidyuan1223/test_changing_column_comment.
    
    Closes #6948
    
    983720e78 [davidyuan] test changing column comment
    
    Authored-by: davidyuan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../ranger/PaimonCatalogRangerSparkExtensionSuite.scala | 17 +++++++++++++++++
 1 file changed, 17 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 4f8da3bc22..048ebad77e 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
@@ -356,6 +356,23 @@ class PaimonCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
     }
   }
 
+  test("Changing Column Comment") {
+    withCleanTmpResources(Seq(
+      (s"$catalogV2.$namespace1.$table1", "table"))) {
+      val createTable = createTableSql(namespace1, table1)
+      doAs(admin, sql(createTable))
+      val changingColumnCommentSql =
+        s"""
+           |ALTER TABLE $catalogV2.$namespace1.$table1
+           |ALTER COLUMN name COMMENT "test comment"
+           |""".stripMargin
+      interceptEndsWith[AccessControlException] {
+        doAs(someone, sql(changingColumnCommentSql))
+      }(s"does not have [alter] privilege on [$namespace1/$table1]")
+      doAs(admin, sql(changingColumnCommentSql))
+    }
+  }
+
   def createTableSql(namespace: String, table: String): String =
     s"""
        |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace.$table

Reply via email to