yabola commented on code in PR #5248:
URL: https://github.com/apache/kyuubi/pull/5248#discussion_r1319594486


##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala:
##########
@@ -145,14 +175,37 @@ class DataSourceV2RelationTableExtractor extends 
TableExtractor {
         val maybeCatalogPlugin = invokeAs[Option[AnyRef]](v2Relation, 
"catalog")
         val maybeCatalog = maybeCatalogPlugin.flatMap(catalogPlugin =>
           lookupExtractor[CatalogPluginCatalogExtractor].apply(catalogPlugin))
-        val maybeIdentifier = invokeAs[Option[AnyRef]](v2Relation, 
"identifier")

Review Comment:
   When CALL ice.system.rewrite_data_files command does the rewrite operation, 
two logical plans will be generated, for example as in my newly added unit test:
   
      * This triggers two logical plans( input-files(2) >= min-input-files(2) ):
      * == Physical Plan 1 ==
      * (1) Call
      *
      * == Physical Plan 2 ==
      * AppendData (3)
      * +- * ColumnarToRow (2)
      * +- BatchScan local.iceberg_ns.call_command_table (1)
   
    In the second logical plan, the `DataSourceV2Relation#identifier` in 
`AppendData` will be rewrite task id. So it is a more appropriate way to parse 
the table name from `DataSourceV2Relation#table`
    
   <img width="1318" alt="image" 
src="https://github.com/apache/kyuubi/assets/31469905/efc815cb-8dfe-4a9f-8e24-d62883ef6eff";>
   
    



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