Open bowenliang123 opened 1 year ago
hello, i want try this issue, but i'm not sure how to improve it, this code is a createTableAsSql for paimon
test("CreateTableAs") {
withCleanTmpResources(Seq((s"$catalogV2.$namespace1.$table1", "table"),
(s"$catalogV2.$namespace1.$table2", "table"))) {
doAs(
admin,
sql(
s"""
|CREATE TABLE IF NOT EXISTS $catalogV2.$namespace1.$table1
|(id int, name string, city string)
|USING paimon
|OPTIONS (
| primaryKey = 'id'
|)
|""".stripMargin
)
)
interceptContains[AccessControlException] {
doAs(
someone,
sql(
s"""
|CREATE TABLE IF NOT EXISTS $catalogV2.$namespace1.$table2
|USING PAIMON
|AS
|SELECT * FROM $catalogV2.$namespace1.$table1
|""".stripMargin
)
)
}(s"does not have [select] privilege on [$table1/id]")
}
}
But when i try admin to execute the createTableAs Sql, the authz also will print exception, like user [admin] does not have [select] privilege on [$table1/id]
hello, i want try this issue, but i'm not sure how to improve it, this code is a createTableAsSql for paimon
test("CreateTableAs") { withCleanTmpResources(Seq((s"$catalogV2.$namespace1.$table1", "table"), (s"$catalogV2.$namespace1.$table2", "table"))) { doAs( admin, sql( s""" |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace1.$table1 |(id int, name string, city string) |USING paimon |OPTIONS ( | primaryKey = 'id' |) |""".stripMargin ) ) interceptContains[AccessControlException] { doAs( someone, sql( s""" |CREATE TABLE IF NOT EXISTS $catalogV2.$namespace1.$table2 |USING PAIMON |AS |SELECT * FROM $catalogV2.$namespace1.$table1 |""".stripMargin ) ) }(s"does not have [select] privilege on [$table1/id]") } }
But when i try admin to execute the createTableAs Sql, the authz also will print exception, like
user [admin] does not have [select] privilege on [$table1/id]
Hi, I'm not reproducing the case you mentioned. And #5590 is raised for it, you may have a check on this. If you still encounter this issue, please submit a dedicated issue with code and logs showing the full test cases for positive and negative.
Code of Conduct
Search before asking
Describe the proposal
Introduce Paimon support in Kyuubi Authz plugin.
Apache Paimon is an incubating Apache project of data lake platform for high-speed data ingestion, changelog tracking and efficient real-time analytics.
Task list
Paimon Spark 3 Reference: https://paimon.apache.org/docs/master/engines/spark3/
Are you willing to submit PR?