davidyuan1223 commented on issue #5470:
URL: https://github.com/apache/kyuubi/issues/5470#issuecomment-1787008858

   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]`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to