anoopj commented on code in PR #2869:
URL: https://github.com/apache/iceberg-rust/pull/2869#discussion_r3632140409
##########
crates/iceberg/src/scan/cache.rs:
##########
@@ -235,3 +260,81 @@ impl ExpressionEvaluatorCache {
Ok(read.get(&spec_id).unwrap().clone())
}
}
+
+#[cfg(test)]
+mod tests {
+ use std::collections::HashMap;
+ use std::sync::Arc;
+
+ use super::PartitionFilterCache;
+ use crate::expr::{Bind, BoundPredicate, Reference};
+ use crate::spec::{
+ Datum, FormatVersion, NestedField, PrimitiveType, Schema, SortOrder,
TableMetadataBuilder,
+ Transform, Type, UnboundPartitionSpec,
+ };
+
+ /// A historical spec whose source column was dropped from the current
schema resolves to an
+ /// always-true filter, and the fallback is cached under the spec id.
+ #[test]
+ fn dropped_partition_source_column_falls_back_to_always_true() {
Review Comment:
There is a test that already does this?
`test_filtered_scan_with_dropped_partition_source_column` it runs a filtered
scan against a table whose manifest reference a spec with dropped source column
and asserts the results. Adding a second test would duplicate it.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]