davidyuan1223 opened a new pull request, #5592:
URL: https://github.com/apache/kyuubi/pull/5592

   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: 
https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
     2. If the PR is related to an issue in 
https://github.com/apache/kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, 
e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., 
'[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   This pr is try to fix the https://github.com/apache/kyuubi/pull/5590 's 
problem, but i get some problem, so need someone to help me. The problem desc:
   
   this is the source commt https://github.com/apache/kyuubi/pull/5590
           i try to add PaimonDataSourceV2RelationTableExtractor in 
TableExtractor to make we can fix the question, but when i add the extractor 
and get table info, this is the root call extrcator code
   ```
   case class RuleApplyRowFilter(spark: SparkSession) extends RuleHelper {
       override def apply(plan: LogicalPlan): LogicalPlan = {
           val newPlan = mapChildren(plan) {
               case p: RowFilterMarker => p
               case scan if isKnownScan(scan) && scan.resolved =>
                   val tables = getScanSpec(scan).tables(scan, spark)
                   tables.headOption.map(applyFilter(scan, _)).getOrElse(scan)
               case other => apply(other)
           }
           newPlan
       }
   
       private def applyFilter(
               plan: LogicalPlan,
               table: Table): LogicalPlan = {
           val are = AccessResource(ObjectType.TABLE, table.database.orNull, 
table.table, null)
           val art = AccessRequest(are, ugi, QUERY, AccessType.SELECT)
           val filterExpr = SparkRangerAdminPlugin.getFilterExpr(art).map(parse)
           val filtered = filterExpr.foldLeft(plan)((p, expr) => Filter(expr, 
RowFilterMarker(p)))
           filtered
       }
   }
   ```
   if we add two exector for the RelationV2 plan, we will get two tables, but 
the apply code only use the first table
   if the tables is
   ```
   Table(Some(paimon_catalog),None,table1,Some(admin))
   Table(Some(paimon_catalog),Some(paimon_ns),table1,Some(admin))
   ```
   the source code will only filter the first table result, is that right?
   
   
   @bowenliang123 @pan3793 do you know how to solve this?
   
   
   ### _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
   
   - [ ] [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?_
   <!--
   If a generative AI tooling has been used in the process of authoring this 
patch, please include
   phrase 'Generated-by: ' followed by the name of the tool and its version.
   If no, write 'No'.
   Please refer to the [ASF Generative Tooling 
Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   


-- 
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: notifications-unsubscr...@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org
For additional commands, e-mail: notifications-h...@kyuubi.apache.org

Reply via email to