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 e1393247f7 [KYUUBI #6951] Test changing column type
e1393247f7 is described below
commit e1393247f73af507591f109e6dc3a1a8ac74f760
Author: davidyuan <[email protected]>
AuthorDate: Mon Mar 17 16:20:33 2025 +0800
[KYUUBI #6951] Test changing column type
### Why are the changes needed?
Ranger check test case missing paimon changing column type command, add the
test case
#6951
### How was this patch tested?
Test ranger check paimon changing column type 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 #6956 from davidyuan1223/test_changing_column_type.
Closes #6951
9d5140e81 [davidyuan] Merge branch 'master' into test_changing_column_type
e4f8974d8 [davidyuan] test changing column type
Authored-by: davidyuan <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
.../PaimonCatalogRangerSparkExtensionSuite.scala | 18 ++++++++++++++++++
1 file changed, 18 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 4248ea4416..991b0165d9 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
@@ -531,6 +531,24 @@ class PaimonCatalogRangerSparkExtensionSuite extends
RangerSparkExtensionSuite {
}
}
+ test("Changing Column Type") {
+ withCleanTmpResources(Seq(
+ (s"$catalogV2.$namespace1.$table1", "table"))) {
+ val createTable = createTableSql(namespace1, table1)
+ doAs(admin, sql(createTable))
+ val changingColumnTypeSql =
+ s"""
+ |ALTER TABLE $catalogV2.$namespace1.$table1
+ |ALTER COLUMN id TYPE DOUBLE
+ |""".stripMargin
+
+ interceptEndsWith[AccessControlException] {
+ doAs(someone, sql(changingColumnTypeSql))
+ }(s"does not have [alter] privilege on [$namespace1/$table1]")
+ doAs(admin, sql(changingColumnTypeSql))
+ }
+ }
+
def createTableSql(namespace: String, table: String): String =
s"""
|CREATE TABLE IF NOT EXISTS $catalogV2.$namespace.$table