Skip to content

Commit

Permalink
Additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed May 8, 2024
1 parent a69cbac commit 2064a38
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arrow-array/src/array/union_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,14 @@ mod tests {
UnionArray::try_new(fields.clone(), type_ids, None, children.clone()).unwrap();

let type_ids = vec![1, 2].into();
let err =
UnionArray::try_new(fields.clone(), type_ids, None, children.clone()).unwrap_err();
assert_eq!(
err.to_string(),
"Invalid argument error: Type Ids values must match one of the field type ids"
);

let type_ids = vec![7, 2].into();
let err = UnionArray::try_new(fields.clone(), type_ids, None, children).unwrap_err();
assert_eq!(
err.to_string(),
Expand Down

0 comments on commit 2064a38

Please sign in to comment.