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 525aec04a1 [KYUUBI #6923] Test Create Partitioned Table for Paimon
525aec04a1 is described below

commit 525aec04a150d565bf56fd89b6b95476a6f0b695
Author: davidyuan <[email protected]>
AuthorDate: Mon Feb 24 14:43:40 2025 +0800

    [KYUUBI #6923] Test Create Partitioned Table for Paimon
    
    ### Why are the changes needed?
    
    AUTHZ Test Create Partitioned Table for PAIMON, check that has support the 
command
    #6923
    
    ### How was this patch tested?
    
    est Authz for paimon with create partitioned table command. Check the 
permission
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #6931 from davidyuan1223/support_create_with_parition_for_paimon.
    
    Closes #6923
    
    61f7560d3 [Cheng Pan] Merge branch 'master' into 
support_create_with_parition_for_paimon
    ffb79376f [Cheng Pan] Update 
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
    b0829795a [Bowen Liang] Update 
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala
    4b160d720 [davidyuan] support create partition table as for paimon
    
    Lead-authored-by: davidyuan <[email protected]>
    Co-authored-by: Bowen Liang <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../PaimonCatalogRangerSparkExtensionSuite.scala    | 21 +++++++++++++++++++++
 1 file changed, 21 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 deb65b9a64..4f5169a72c 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
@@ -149,6 +149,27 @@ class PaimonCatalogRangerSparkExtensionSuite extends 
RangerSparkExtensionSuite {
     }
   }
 
+  test("CREATE PARTITIONED Table") {
+    withCleanTmpResources(Seq(
+      (s"$catalogV2.$namespace1.$table1", "table"))) {
+      val createPartitionTableSql =
+        s"""
+           |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace1.$table1
+           |(id INT, name STRING, dt STRING, hh STRING)
+           | USING paimon
+           | PARTITIONED BY (dt, hh)
+           | OPTIONS (
+           |  'primary-key' = 'id'
+           | )
+           |""".stripMargin
+
+      interceptEndsWith[AccessControlException] {
+        doAs(someone, sql(createPartitionTableSql))
+      }(s"does not have [create] privilege on [$namespace1/$table1]")
+      doAs(admin, sql(createPartitionTableSql))
+    }
+  }
+
   def createTableSql(namespace: String, table: String): String =
     s"""
        |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace.$table

Reply via email to