diff --git a/crates/core/src/operations/convert_to_delta.rs b/crates/core/src/operations/convert_to_delta.rs index 8ea214fa22..f4c563fbc5 100644 --- a/crates/core/src/operations/convert_to_delta.rs +++ b/crates/core/src/operations/convert_to_delta.rs @@ -605,16 +605,16 @@ mod tests { .collect::>(); partition_values.sort_by_key(|(k, v)| (k.clone(), v.serialize())); - for it in expected_partition_values.iter().zip(partition_values.iter()) { - let (expected, found) = it; - - match (expected, found) { - // No-oipping the comparison of null. delta-kernel-rs introduces a regression where - // 0.7.0 cannot perform equivalency of typed null Scalars. - (Scalar::Null(_), Scalar::Null(_)) => {}, - _others => { - assert_eq!(expected, found); - }, + for (position, expected) in expected_partition_values.iter().enumerate() { + let (key, value) = expected; + let (found_key, found_value) = partition_values[position].clone(); + assert_eq!(key, &found_key); + + match (value, found_value) { + // no-op the null comparison due to a breaking change in delta-kernel-rs 0.7.0 + // which changes null comparables + (Scalar::Null(_), Scalar::Null(_)) => {} + (v, fv) => assert_eq!(v, &fv), } } } diff --git a/crates/core/src/writer/json.rs b/crates/core/src/writer/json.rs index 81bcc9eab6..a4837eeb6d 100644 --- a/crates/core/src/writer/json.rs +++ b/crates/core/src/writer/json.rs @@ -542,18 +542,13 @@ mod tests { assert_eq!( extract_partition_values( - &[ - String::from("col1"), - String::from("col2"), - String::from("col3") - ], + &[String::from("col1"), String::from("col2"),], &record_batch ) .unwrap(), IndexMap::from([ (String::from("col1"), Scalar::Integer(1)), (String::from("col2"), Scalar::Integer(2)), - (String::from("col3"), Scalar::Null(DataType::INTEGER)), ]) ); assert_eq!(