Skip to content

Commit d8f031a

Browse files
davidyuan1223pan3793
authored andcommitted
[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 f865e13 [davidyuan] test add new column Authored-by: davidyuan <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
1 parent e139324 commit d8f031a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/PaimonCatalogRangerSparkExtensionSuite.scala

+19
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,25 @@ class PaimonCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
255255
}
256256
}
257257

258+
test("Add New Column") {
259+
withCleanTmpResources(Seq(
260+
(s"$catalogV2.$namespace1.$table1", "table"))) {
261+
val createTable = createTableSql(namespace1, table1)
262+
doAs(admin, sql(createTable))
263+
val alterTableSql =
264+
s"""
265+
|ALTER TABLE $catalogV2.$namespace1.$table1
266+
|ADD COLUMNS (
267+
| city STRING
268+
|)
269+
|""".stripMargin
270+
interceptEndsWith[AccessControlException] {
271+
doAs(someone, sql(alterTableSql))
272+
}(s"does not have [alter] privilege on [$namespace1/$table1]")
273+
doAs(admin, sql(alterTableSql))
274+
}
275+
}
276+
258277
test("Adding Column Position") {
259278
withCleanTmpResources(Seq(
260279
(s"$catalogV2.$namespace1.$table1", "table"))) {

0 commit comments

Comments
 (0)