anoopj commented on code in PR #3483:
URL: https://github.com/apache/iceberg-rust/pull/3483#discussion_r4333092566
##########
crates/iceberg/src/scan/context.rs:
##########
@@ -73,6 +73,19 @@ pub(crate) struct ManifestEntryContext {
pub sort_order: Option<SortOrderRef>,
}
+/// Returns whether `current` widens any field of `written` at the same
position
+/// (differing primitive types), i.e. partition values written with `written`
need
+/// widening to `current` before they compare against predicates bound to the
current
+/// schema.
+fn partition_types_differ(current: &StructType, written: &StructType) -> bool {
+ current.fields().len() != written.fields().len()
+ || current
+ .fields()
+ .iter()
+ .zip(written.fields())
+ .any(|(c, w)| c.field_type.as_primitive_type() !=
w.field_type.as_primitive_type())
+}
Review Comment:
Applied your version. Added PrimitiveType to the crate::spec import as noted.
--
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]