Skip to content

Commit

Permalink
ARROW-10042: [Rust] Use ArrayData's PartialEq implementation in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Nov 6, 2020
1 parent 913c51e commit 4d57eb2
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions rust/parquet/src/arrow/arrow_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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<u8> = (0..SMALL_SIZE as u8).collect();
let many_vecs: Vec<_> = std::iter::repeat(one_vec).take(SMALL_SIZE).collect();
Expand All @@ -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<u8> = (0..SMALL_SIZE as u8).collect();
let many_vecs: Vec<_> = std::iter::repeat(one_vec).take(SMALL_SIZE).collect();
Expand Down

0 comments on commit 4d57eb2

Please sign in to comment.