xushiyan commented on code in PR #203:
URL: https://github.com/apache/hudi-rs/pull/203#discussion_r1865199382
##########
crates/core/src/table/partition.rs:
##########
@@ -40,14 +39,11 @@ pub struct PartitionPruner {
impl PartitionPruner {
pub fn new(
- and_filters: &[(&str, &str, &str)],
+ and_filters: &[PartitionFilter],
partition_schema: &Schema,
hudi_configs: &HudiConfigs,
) -> Result<Self> {
- let and_filters = and_filters
- .iter()
- .map(|filter| PartitionFilter::try_from((*filter,
partition_schema)))
- .collect::<Result<Vec<PartitionFilter>>>()?;
+ let and_filters = and_filters.to_vec();
Review Comment:
partition pruner should be one to decide which filter is a valid "partition
filter" by checking against the partition schema. Other filters will be ignored
here (but will be used by storage layer push down logic which we have not
implemented yet). so to summarize the high-level flow is like:
- Hudi filters are constructed from datafusion exprs and pass to the table
APIs
- PartitionPruner is then constructed, which could be empty in case no
filter is applied to partition fields
--
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]