Skip to content

Commit 21cb070

Browse files
committed
fix
1 parent e07d0fa commit 21cb070

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,27 @@
5656
"isInput" : false,
5757
"comment" : ""
5858
} ]
59+
}, {
60+
"classname" : "org.apache.spark.sql.catalyst.plans.logical.AlterColumns",
61+
"tableDescs" : [ {
62+
"fieldName" : "child",
63+
"fieldExtractor" : "ResolvedTableTableExtractor",
64+
"columnDesc" : null,
65+
"actionTypeDesc" : null,
66+
"tableTypeDesc" : null,
67+
"catalogDesc" : null,
68+
"isInput" : false,
69+
"setCurrentDatabaseIfMissing" : false,
70+
"comment" : ""
71+
} ],
72+
"opType" : "ALTERTABLE_ADDCOLS",
73+
"queryDescs" : [ ],
74+
"uriDescs" : [ {
75+
"fieldName" : "child",
76+
"fieldExtractor" : "ResolvedTableURIExtractor",
77+
"isInput" : false,
78+
"comment" : ""
79+
} ]
5980
}, {
6081
"classname" : "org.apache.spark.sql.catalyst.plans.logical.AlterTable",
6182
"tableDescs" : [ {

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ class PaimonCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
446446
doAs(
447447
admin,
448448
sql(s"SELECT commit_time FROM $catalogV2.$namespace1.`$table1$$snapshots`" +
449-
s" ORDER BY commit_time ASC LIMIT 1").collect()(0).getTimestamp(0))
449+
s" ORDER BY commit_time ASC LIMIT 1").collect()(0).get(0))
450450

451451
val queryWithTimestamp =
452452
s"""
@@ -556,11 +556,13 @@ class PaimonCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
556556
val changingColumnTypeSql =
557557
s"""
558558
|ALTER TABLE $catalogV2.$namespace1.$table1
559-
|ALTER COLUMN id TYPE DOUBLE
559+
|ALTER COLUMN name TYPE STRING
560560
|""".stripMargin
561561

562562
interceptEndsWith[AccessControlException] {
563-
doAs(someone, sql(changingColumnTypeSql))
563+
val df = doAs(someone, sql(changingColumnTypeSql))
564+
df.queryExecution.executedPlan
565+
df.show
564566
}(s"does not have [alter] privilege on [$namespace1/$table1]")
565567
doAs(admin, sql(changingColumnTypeSql))
566568
}

0 commit comments

Comments
 (0)