[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 <chengpan@apache.org>

Closes #6945 from davidyuan1223/test_add_new_column_for_paimon.

Closes #6941

f865e132a [davidyuan] test add new column

Authored-by: davidyuan <yuanfuyuan@mafengwo.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
davidyuan 2025-03-17 16:25:26 +08:00 committed by Cheng Pan
parent e1393247f7
commit d8f031a9fc
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D

View File

@ -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"))) {