boneanxs opened a new pull request, #8452:
URL: https://github.com/apache/hudi/pull/8452

   ### Change Logs
   
   1. Implement some basic `Expression`s for HUDI
   2. Try to convert all spark `Expression` to HUDI `Expression`
   3. Implement `PartialBindVisitor` and `BindVistor` to bind values to HUDI 
`Expression`
   4. Currently, we only support push down `EqualTo` Filters if it's the first 
level of partitions(by path prefix), this pr tries to pushdown more complex 
partition filters(Like `And`, `Or`, `EqualTo` etc) when fetching partitions. 
Through Parallel listing partition paths,  will use `PartialBindVisitor` to 
bind partitions which are listed, and change the unresolved references to 
`AlwaysTrue`.
   e.g.
   
   ```java
   Given the table has 3 partition levels: year, month, day. And the existing 
table partition paths are:
   year=2023/month=2/day=11
   year=2023/month=2/day=12
   year=2024/month=2/day=12
   If we want to push down the filter `year=2023 AND day=12`, When listing the 
partition first level `year`, will bind schema `year` to `PartialBindVisitor`.
   Since `day` is not provided, the filter will be modified to `year=2023 AND 
TRUE`(optimized to `year=2023`), so the first 2 paths will be selected.
   Then starts to parallel listing first 2 paths, since the day is still not 
provided, these 2 paths still are selected.
   And finally listing the last partition level, the filter `year=2023 AND 
day=12` will be used and return `year=2023/month=2/day=12`
   ```
   
   Because of 
[discuss1](https://github.com/apache/hudi/pull/8452#discussion_r1191971668) 
[discuss2](https://github.com/apache/hudi/pull/8452#discussion_r1199997268), 
this feature would take effect if:
   1. For `FileSystemBackedTableMetadata`: 
`hoodie.datasource.write.hive_style_partitioning` and 
`hoodie.datasource.write.partitionpath.urlencode` are both enabled
   2. For `HoodieTableBackedTableMetadata`(`hoodie.metadata.enable` is true): 
only `hoodie.datasource.write.hive_style_partitioning` is enabled
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance 
impact._
   None, will fall back to old behavior if cannot be pushed down.
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the 
risks._
   medium
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, 
config, or user-facing change_
   
   - _The config description must be updated if new configs are added or the 
default value of the configs are changed_
   - _Any new feature or user-facing change requires updating the Hudi website. 
Please create a Jira ticket, attach the
     ticket number here and follow the 
[instruction](https://hudi.apache.org/contribute/developer-setup#website) to 
make
     changes to the website._
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


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

Reply via email to