apache / iceberg-rust

Apache Iceberg
https://rust.iceberg.apache.org/
Apache License 2.0
469 stars 95 forks source link

bug: Filter predicate is duplicated in `TableScanBuilder` and `TableScan` 🤦🏼‍♂️ #407

Closed sdd closed 1 week ago

sdd commented 1 week ago

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: https://github.com/apache/iceberg-rust/blob/adc5d200582f820ef408975bf541218aa9b07d64/crates/iceberg/src/scan.rs#L52-L56

https://github.com/apache/iceberg-rust/blob/adc5d200582f820ef408975bf541218aa9b07d64/crates/iceberg/src/scan.rs#L85-L91

https://github.com/apache/iceberg-rust/blob/adc5d200582f820ef408975bf541218aa9b07d64/crates/iceberg/src/scan.rs#L99-L103

And here in TableScan, bound_predicates and filter: https://github.com/apache/iceberg-rust/blob/adc5d200582f820ef408975bf541218aa9b07d64/crates/iceberg/src/scan.rs#L192-L196

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!

sdd commented 1 week ago

@liurenjie1024 can you add the good first issue label please?

liurenjie1024 commented 1 week ago

@liurenjie1024 can you add the good first issue label please?

Sure, done.