From 4d57eb208b48f38e2a3c65be5eaa8d96ad672f70 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Fri, 6 Nov 2020 09:45:18 -0500 Subject: [PATCH] ARROW-10042: [Rust] Use ArrayData's PartialEq implementation in tests --- rust/parquet/src/arrow/arrow_writer.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/rust/parquet/src/arrow/arrow_writer.rs b/rust/parquet/src/arrow/arrow_writer.rs index de8bc7c1d4626..8a011a855b623 100644 --- a/rust/parquet/src/arrow/arrow_writer.rs +++ b/rust/parquet/src/arrow/arrow_writer.rs @@ -915,17 +915,7 @@ mod tests { let expected_data = expected_batch.column(i).data(); let actual_data = actual_batch.column(i).data(); - assert_eq!(expected_data.data_type(), actual_data.data_type()); - assert_eq!(expected_data.len(), actual_data.len()); - assert_eq!(expected_data.null_count(), actual_data.null_count()); - assert_eq!(expected_data.offset(), actual_data.offset()); - assert_eq!(expected_data.buffers(), actual_data.buffers()); - assert_eq!(expected_data.child_data(), actual_data.child_data()); - // Null counts should be the same, not necessarily bitmaps - // A null bitmap is optional if an array has no nulls - if expected_data.null_count() != 0 { - assert_eq!(expected_data.null_bitmap(), actual_data.null_bitmap()); - } + assert_eq!(expected_data, actual_data); } } @@ -1202,7 +1192,6 @@ mod tests { } #[test] - #[ignore] // Binary support isn't correct yet - buffers don't match fn binary_single_column() { let one_vec: Vec = (0..SMALL_SIZE as u8).collect(); let many_vecs: Vec<_> = std::iter::repeat(one_vec).take(SMALL_SIZE).collect(); @@ -1213,7 +1202,6 @@ mod tests { } #[test] - #[ignore] // Large binary support isn't correct yet - buffers don't match fn large_binary_single_column() { let one_vec: Vec = (0..SMALL_SIZE as u8).collect(); let many_vecs: Vec<_> = std::iter::repeat(one_vec).take(SMALL_SIZE).collect();