This is an automated email from the ASF dual-hosted git repository.

bowenliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ade14806 [KYUUBI #5506] [AUTHZ][MINOR] Reuse loaded table extractor 
in Hudi table extractors
4ade14806 is described below

commit 4ade148061eef05fcf63f6b597ca3ed85682c920
Author: Bowen Liang <[email protected]>
AuthorDate: Thu Oct 26 21:43:20 2023 +0800

    [KYUUBI #5506] [AUTHZ][MINOR] Reuse loaded table extractor in Hudi table 
extractors
    
    ### _Why are the changes needed?_
    
    - Reuse loaded table extractor by using `lookupExtractor` in Hudi table 
extractors
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including 
negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run 
test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests)
 locally before make a pull request
    
    ### _Was this patch authored or co-authored using generative AI tooling?_
    
    No.
    
    Closes #5506 from bowenliang123/authz-reuse-ext.
    
    Closes #5506
    
    552f1d504 [Bowen Liang] reuse loaded table extractor in hudi table 
extractors
    
    Authored-by: Bowen Liang <[email protected]>
    Signed-off-by: liangbowen <[email protected]>
---
 .../apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala
 
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala
index 2c212cc5c..a54b58c33 100644
--- 
a/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala
+++ 
b/extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/tableExtractors.scala
@@ -249,10 +249,10 @@ class HudiDataSourceV2RelationTableExtractor extends 
TableExtractor {
     invokeAs[LogicalPlan](v1, "table") match {
       // Match multipartIdentifier with tableAlias
       case SubqueryAlias(_, SubqueryAlias(identifier, _)) =>
-        new StringTableExtractor().apply(spark, identifier.toString())
+        lookupExtractor[StringTableExtractor].apply(spark, 
identifier.toString())
       // Match multipartIdentifier without tableAlias
       case SubqueryAlias(identifier, _) =>
-        new StringTableExtractor().apply(spark, identifier.toString())
+        lookupExtractor[StringTableExtractor].apply(spark, 
identifier.toString())
     }
   }
 }
@@ -262,10 +262,10 @@ class HudiMergeIntoTargetTableExtractor extends 
TableExtractor {
     invokeAs[LogicalPlan](v1, "targetTable") match {
       // Match multipartIdentifier with tableAlias
       case SubqueryAlias(_, SubqueryAlias(identifier, relation)) =>
-        new StringTableExtractor().apply(spark, identifier.toString())
+        lookupExtractor[StringTableExtractor].apply(spark, 
identifier.toString())
       // Match multipartIdentifier without tableAlias
       case SubqueryAlias(identifier, _) =>
-        new StringTableExtractor().apply(spark, identifier.toString())
+        lookupExtractor[StringTableExtractor].apply(spark, 
identifier.toString())
     }
   }
 }

Reply via email to