File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,10 @@ impl CastReduce for Dict {
2121 // TODO(joe): optimize this, could look at accessible values and fill_null not those?
2222 if !dtype. is_nullable ( )
2323 && array. values ( ) . dtype ( ) . is_nullable ( )
24- && matches ! ( array. values( ) . validity( ) ?, Validity :: AllValid )
24+ && !matches ! (
25+ array. values( ) . validity( ) ?,
26+ Validity :: NonNullable | Validity :: AllValid
27+ )
2528 {
2629 return Ok ( None ) ;
2730 }
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ use vortex_buffer::BufferMut;
77use vortex_error:: vortex_panic;
88
99use crate :: IntoArray ;
10+ #[ cfg( debug_assertions) ]
1011use crate :: LEGACY_SESSION ;
12+ #[ cfg( debug_assertions) ]
1113use crate :: VortexSessionExecute ;
1214use crate :: arrays:: PrimitiveArray ;
1315use crate :: arrays:: VarBinArray ;
@@ -151,19 +153,13 @@ mod tests {
151153 assert_eq ! ( array. dtype( ) . nullability( ) , Nullable ) ;
152154 assert_eq ! (
153155 array
154- . execute_scalar(
155- 0 ,
156- & mut VortexSessionExecute :: create_execution_ctx( & * LEGACY_SESSION )
157- )
156+ . execute_scalar( 0 , & mut LEGACY_SESSION . create_execution_ctx( ) )
158157 . unwrap( ) ,
159158 Scalar :: utf8( "hello" . to_string( ) , Nullable )
160159 ) ;
161160 assert ! (
162161 array
163- . execute_scalar(
164- 1 ,
165- & mut VortexSessionExecute :: create_execution_ctx( & * LEGACY_SESSION )
166- )
162+ . execute_scalar( 1 , & mut LEGACY_SESSION . create_execution_ctx( ) )
167163 . unwrap( )
168164 . is_null( )
169165 ) ;
You can’t perform that action at this time.
0 commit comments