-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Somehow, between my PR and @viirya's PR getting merged, we've ended up with the filter predicate being duplicated in the TableScanBuilder and the TableScan.
See predicates and filter:
iceberg-rust/crates/iceberg/src/scan.rs
Lines 52 to 56 in adc5d20
| predicates: Option<Predicate>, | |
| snapshot_id: Option<i64>, | |
| batch_size: Option<usize>, | |
| case_sensitive: bool, | |
| filter: Option<Predicate>, |
iceberg-rust/crates/iceberg/src/scan.rs
Lines 85 to 91 in adc5d20
| /// Specifies a predicate to use as a filter | |
| pub fn with_filter(mut self, predicate: Predicate) -> Self { | |
| // calls rewrite_not to remove Not nodes, which must be absent | |
| // when applying the manifest evaluator | |
| self.filter = Some(predicate.rewrite_not()); | |
| self | |
| } |
iceberg-rust/crates/iceberg/src/scan.rs
Lines 99 to 103 in adc5d20
| /// Add a predicate to the scan. The scan will only return rows that match the predicate. | |
| pub fn filter(mut self, predicate: Predicate) -> Self { | |
| self.predicates = Some(predicate); | |
| self | |
| } |
And here in TableScan, bound_predicates and filter:
iceberg-rust/crates/iceberg/src/scan.rs
Lines 192 to 196 in adc5d20
| bound_predicates: Option<BoundPredicate>, | |
| schema: SchemaRef, | |
| batch_size: Option<usize>, | |
| case_sensitive: bool, | |
| filter: Option<Arc<Predicate>>, |
The predicate pushdown uses one of these but the file plan uses another, which caused a lot of confusion when I was trying to track down why my queries were misbehaving!
Metadata
Metadata
Assignees
Labels
Type
Projects
Status