File tree Expand file tree Collapse file tree
parquet-variant-compute/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4237,12 +4237,13 @@ mod test {
42374237 ] ;
42384238
42394239 for ( request_type, expected) in expectations {
4240- let options = GetOptions :: new_with_path ( VariantPath :: from ( "outer" ) . join ( "list" ) )
4241- . with_as_type ( Some ( FieldRef :: from ( Field :: new (
4242- "result" ,
4243- request_type. clone ( ) ,
4244- true ,
4245- ) ) ) ) ;
4240+ let options =
4241+ GetOptions :: new_with_path ( VariantPath :: from_str_or_panic ( "outer" ) . join ( "list" ) )
4242+ . with_as_type ( Some ( FieldRef :: from ( Field :: new (
4243+ "result" ,
4244+ request_type. clone ( ) ,
4245+ true ,
4246+ ) ) ) ) ;
42464247
42474248 let result = variant_get ( & variant_array, options) . unwrap ( ) ;
42484249 assert_eq ! ( result. data_type( ) , expected. data_type( ) ) ;
@@ -4254,13 +4255,16 @@ mod test {
42544255 ( 1 , vec ! [ None , None ] ) ,
42554256 ( 2 , vec ! [ Some ( 3 ) , None ] ) ,
42564257 ] {
4257- let index_options =
4258- GetOptions :: new_with_path ( VariantPath :: from ( "outer" ) . join ( "list" ) . join ( idx) )
4259- . with_as_type ( Some ( FieldRef :: from ( Field :: new (
4260- "result" ,
4261- DataType :: Int64 ,
4262- true ,
4263- ) ) ) ) ;
4258+ let index_options = GetOptions :: new_with_path (
4259+ VariantPath :: from_str_or_panic ( "outer" )
4260+ . join ( "list" )
4261+ . join ( idx) ,
4262+ )
4263+ . with_as_type ( Some ( FieldRef :: from ( Field :: new (
4264+ "result" ,
4265+ DataType :: Int64 ,
4266+ true ,
4267+ ) ) ) ) ;
42644268 let index_result = variant_get ( & variant_array, index_options) . unwrap ( ) ;
42654269 let index_expected: ArrayRef = Arc :: new ( Int64Array :: from ( expected) ) ;
42664270 assert_eq ! ( & index_result, & index_expected) ;
You can’t perform that action at this time.
0 commit comments