-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Describe the bug
I would expect the following test case to pass. In both arrays the second element is marked as null and so they should compare equal.
#[test]
fn test_list_array_equal() {
let mut builder = ListBuilder::new(Int64Builder::new(10));
builder.values().append_value(1).unwrap();
builder.values().append_value(2).unwrap();
builder.values().append_value(3).unwrap();
builder.append(true).unwrap();
builder.append(false).unwrap();
let array1 = builder.finish();
let mut builder = ListBuilder::new(Int64Builder::new(10));
builder.values().append_value(1).unwrap();
builder.values().append_value(2).unwrap();
builder.values().append_value(3).unwrap();
builder.append(true).unwrap();
builder.values().append_null().unwrap();
builder.values().append_null().unwrap();
builder.append(false).unwrap();
let array2 = builder.finish();
assert_eq!(array1, array2);
}
The output of the assert_eq also shows both sides the same:
assertion failed: `(left == right)`
left: `ListArray
[
PrimitiveArray<Int64>
[
1,
2,
3,
],
null,
]`,
right: `ListArray
[
PrimitiveArray<Int64>
[
1,
2,
3,
],
null,
]`
Reactions are currently unavailable