From 2064a3884cab7756d96f7adb5cb3521cef18f259 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies Date: Wed, 8 May 2024 08:15:58 +0100 Subject: [PATCH] Additional test --- arrow-array/src/array/union_array.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arrow-array/src/array/union_array.rs b/arrow-array/src/array/union_array.rs index 31fe85850f17..ea4853cd1528 100644 --- a/arrow-array/src/array/union_array.rs +++ b/arrow-array/src/array/union_array.rs @@ -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(),