alamb commented on issue #706: URL: https://github.com/apache/iceberg-rust/issues/706#issuecomment-2488343199
In case it helps, here is the workaround we used: (there is something about the `partition` on `DataFile` that doesn't compare as equal ```rust /// Validates that two `Manifest`s are equal. /// /// The partial_eq implementation for `Manifest` seems to compare some fields structurally /// e fn assert_manifest_eq(m1: Manifest, m2: Manifest) { let (entries1, metadata1) = m1.into_parts(); let (entries2, metadata2) = m2.into_parts(); assert_eq!(entries1.len(), entries2.len()); for (e1, e2) in entries1.into_iter().zip(entries2.into_iter()) { assert_manifest_entry_eq(&e1, &e2); } assert_eq!(metadata1, metadata2); } /// Validates that two `ManifestEntry`s are equal. /// /// Can't use the partial_eq implementation for `ManifestEntry` because it /// seems to have a bug in the equality check for partition. fn assert_manifest_entry_eq(e1: &ManifestEntry, e2: &ManifestEntry) { assert_eq!(e1.content_type(), e2.content_type()); let file1 = e1.data_file(); let file2 = e2.data_file(); assert_eq!(file1.content_type(), file2.content_type()); assert_eq!(file1.file_path(), file2.file_path()); assert_eq!(file1.file_format(), file2.file_format()); // seems to have a bug in the equality check for partition; // assert_eq!(file1.partition(), file2.partition()); assert_eq!(file1.record_count(), file2.record_count()); assert_eq!(file1.file_size_in_bytes(), file2.file_size_in_bytes()); assert_eq!(file1.column_sizes(), file2.column_sizes()); assert_eq!(file1.value_counts(), file2.value_counts()); assert_eq!(file1.null_value_counts(), file2.null_value_counts()); assert_eq!(file1.nan_value_counts(), file2.nan_value_counts()); assert_eq!(file1.lower_bounds(), file2.lower_bounds()); assert_eq!(file1.upper_bounds(), file2.upper_bounds()); assert_eq!(file1.key_metadata(), file2.key_metadata()); assert_eq!(file1.split_offsets(), file2.split_offsets()); assert_eq!(file1.equality_ids(), file2.equality_ids()); assert_eq!(file1.sort_order_id(), file2.sort_order_id()); } ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org