Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KYUUBI #6947] Test Dropping Columns #6952

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,24 @@ class PaimonCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
}
}

test("Dropping Columns") {
withCleanTmpResources(Seq(
(s"$catalogV2.$namespace1.$table1", "table"))) {
val createTable = createTableSql(namespace1, table1)
doAs(admin, sql(createTable))
val droppingColumnsSql =
s"""
|ALTER TABLE $catalogV2.$namespace1.$table1
|DROP COLUMNS (name)
|""".stripMargin

interceptEndsWith[AccessControlException] {
doAs(someone, sql(droppingColumnsSql))
}(s"does not have [alter] privilege on [$namespace1/$table1]")
doAs(admin, sql(droppingColumnsSql))
}
}

def createTableSql(namespace: String, table: String): String =
s"""
|CREATE TABLE IF NOT EXISTS $catalogV2.$namespace.$table
Expand Down
Loading