@@ -111,7 +111,7 @@ fn test_cast_from_bool(array: &dyn Array, nullability: Nullability) {
111111 test_cast_nullability_changes ( array, & DType :: Bool ( Nullability :: Nullable ) ) ;
112112 if nullability == Nullability :: Nullable {
113113 // Try casting to non-nullable (may fail if nulls present)
114- let _ = cast ( array, & DType :: Bool ( Nullability :: NonNullable ) ) ;
114+ cast ( array, & DType :: Bool ( Nullability :: NonNullable ) ) . vortex_unwrap ( ) ;
115115 }
116116
117117 // Test bool to numeric casts (true -> 1, false -> 0)
@@ -126,10 +126,11 @@ fn test_cast_from_decimal(array: &dyn Array, nullability: Nullability) {
126126 test_cast_nullability_changes ( array, & DType :: Decimal ( * decimal_type, Nullability :: Nullable ) ) ;
127127 if nullability == Nullability :: Nullable {
128128 // Try casting to non-nullable (may fail if nulls present)
129- let _ = cast (
129+ cast (
130130 array,
131131 & DType :: Decimal ( * decimal_type, Nullability :: NonNullable ) ,
132- ) ;
132+ )
133+ . vortex_unwrap ( ) ;
133134 }
134135 }
135136}
@@ -139,7 +140,7 @@ fn test_cast_from_utf8(array: &dyn Array, nullability: Nullability) {
139140 test_cast_nullability_changes ( array, & DType :: Utf8 ( Nullability :: Nullable ) ) ;
140141 if nullability == Nullability :: Nullable {
141142 // Try casting to non-nullable (may fail if nulls present)
142- let _ = cast ( array, & DType :: Utf8 ( Nullability :: NonNullable ) ) ;
143+ cast ( array, & DType :: Utf8 ( Nullability :: NonNullable ) ) . vortex_unwrap ( ) ;
143144 }
144145
145146 // UTF-8 strings can potentially be cast to Binary
@@ -151,7 +152,7 @@ fn test_cast_from_binary(array: &dyn Array, nullability: Nullability) {
151152 test_cast_nullability_changes ( array, & DType :: Binary ( Nullability :: Nullable ) ) ;
152153 if nullability == Nullability :: Nullable {
153154 // Try casting to non-nullable (may fail if nulls present)
154- let _ = cast ( array, & DType :: Binary ( Nullability :: NonNullable ) ) ;
155+ cast ( array, & DType :: Binary ( Nullability :: NonNullable ) ) . vortex_unwrap ( ) ;
155156 }
156157
157158 // Binary might be castable to UTF-8 if it contains valid UTF-8
@@ -164,10 +165,11 @@ fn test_cast_from_struct(array: &dyn Array, nullability: Nullability) {
164165 test_cast_nullability_changes ( array, & DType :: Struct ( fields. clone ( ) , Nullability :: Nullable ) ) ;
165166 if nullability == Nullability :: Nullable {
166167 // Try casting to non-nullable (may fail if nulls present)
167- let _ = cast (
168+ cast (
168169 array,
169170 & DType :: Struct ( fields. clone ( ) , Nullability :: NonNullable ) ,
170- ) ;
171+ )
172+ . vortex_unwrap ( ) ;
171173 }
172174 }
173175}
@@ -181,10 +183,11 @@ fn test_cast_from_list(array: &dyn Array, nullability: Nullability) {
181183 ) ;
182184 if nullability == Nullability :: Nullable {
183185 // Try casting to non-nullable (may fail if nulls present)
184- let _ = cast (
186+ cast (
185187 array,
186188 & DType :: List ( element_type. clone ( ) , Nullability :: NonNullable ) ,
187- ) ;
189+ )
190+ . vortex_unwrap ( ) ;
188191 }
189192 }
190193}
@@ -198,10 +201,11 @@ fn test_cast_from_fixed_size_list(array: &dyn Array, nullability: Nullability) {
198201 ) ;
199202 if nullability == Nullability :: Nullable {
200203 // Try casting to non-nullable (may fail if nulls present)
201- let _ = cast (
204+ cast (
202205 array,
203206 & DType :: FixedSizeList ( element_type. clone ( ) , * list_size, Nullability :: NonNullable ) ,
204- ) ;
207+ )
208+ . vortex_unwrap ( ) ;
205209 }
206210 }
207211}
0 commit comments