KnightChess opened a new pull request, #119:
URL: https://github.com/apache/hudi-rs/pull/119

   ## Description
   
   #47 
   support hudi internal filter, engine like datafusion or other need cover it 
expression to hudi partition filter.
   something like this code, 
   ```rust 
   let filter_one = PartitionFilter::try_from(("shortField", "=", "100", 
short_field_data_type)).unwrap();
   let filter_two = PartitionFilter::try_from(("shortField", ">", "100", 
short_field_data_type)).unwrap();
   hudi_table.partition_filter_replace(vec![filter_one, filter_two]);
   ```
   
   the core struct filter define, key is partirion field, value is 
expression-value
   ```rust 
   pub struct PartitionFilter {
       /// The key of the PartitionFilter
       pub key: String,
       /// The value of the PartitionFilter
       pub value: PartitionValue
   }
   ```
   expression-value: reuse datafusion `ScalarValue`.
   ```rust 
   pub enum PartitionValue {
       /// The partition value with the equal operator
       Equal(ScalarValue),
       /// The partition value with the not equal operator
       NotEqual(ScalarValue),
       /// The partition value with the greater than operator
       GreaterThan(ScalarValue),
       /// The partition value with the greater than or equal operator
       GreaterThanOrEqual(ScalarValue),
       /// The partition value with the less than operator
       LessThan(ScalarValue),
       /// The partition value with the less than or equal operator
       LessThanOrEqual(ScalarValue),
       /// The partition values with the in operator
       In(Vec<ScalarValue>),
       /// The partition values with the not in operator
       NotIn(Vec<ScalarValue>),
   }
   
   ```
   
   ## How are the changes test-covered
   
   - [ ] N/A
   - [ ] Automated tests (unit and/or integration tests)
   - [ ] Manual tests
   - [ ] Details are described below
   


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