@@ -464,24 +464,8 @@ fn actions_for_dtype(dtype: &DType) -> HashSet<ActionType> {
464464 use ActionType :: * ;
465465
466466 match dtype {
467- DType :: Struct ( sdt, _) => {
468- // Struct supports: Compress, Slice, Take, Filter, MinMax, Mask, ScalarAt
469- // Does NOT support: SearchSorted (requires scalar comparison), Compare, Cast, Sum, FillNull
470- let struct_actions = [ Compress , Slice , Take , Filter , MinMax , Mask , ScalarAt ] ;
471- sdt. fields ( )
472- . map ( |child| actions_for_dtype ( & child) )
473- . fold ( struct_actions. into ( ) , |acc, actions| {
474- acc. intersection ( & actions) . copied ( ) . collect ( )
475- } )
476- }
477- DType :: List ( ..) | DType :: FixedSizeList ( ..) => {
478- // List supports: Compress, Slice, Take, Filter, MinMax, Mask, ScalarAt
479- // Does NOT support: SearchSorted, Compare, Cast, Sum, FillNull
480- [ Compress , Slice , Take , Filter , MinMax , Mask , ScalarAt ] . into ( )
481- }
482- DType :: Utf8 ( _) | DType :: Binary ( _) => {
483- // Utf8/Binary supports everything except Sum and FillNull
484- // Actions: Compress, Slice, Take, SearchSorted, Filter, Compare, Cast, MinMax, Mask, ScalarAt
467+ DType :: Null => {
468+ // Null arrays support most operations but not Sum or MinMax (return None for dtype)
485469 [
486470 Compress ,
487471 Slice ,
@@ -490,7 +474,7 @@ fn actions_for_dtype(dtype: &DType) -> HashSet<ActionType> {
490474 Filter ,
491475 Compare ,
492476 Cast ,
493- MinMax ,
477+ FillNull ,
494478 Mask ,
495479 ScalarAt ,
496480 ]
@@ -500,8 +484,9 @@ fn actions_for_dtype(dtype: &DType) -> HashSet<ActionType> {
500484 // These support all actions
501485 ActionType :: iter ( ) . collect ( )
502486 }
503- DType :: Null => {
504- // Null arrays support most operations but not Sum or MinMax (return None for dtype)
487+ DType :: Utf8 ( _) | DType :: Binary ( _) => {
488+ // Utf8/Binary supports everything except Sum and FillNull
489+ // Actions: Compress, Slice, Take, SearchSorted, Filter, Compare, Cast, MinMax, Mask, ScalarAt
505490 [
506491 Compress ,
507492 Slice ,
@@ -510,12 +495,28 @@ fn actions_for_dtype(dtype: &DType) -> HashSet<ActionType> {
510495 Filter ,
511496 Compare ,
512497 Cast ,
513- FillNull ,
498+ MinMax ,
514499 Mask ,
515500 ScalarAt ,
516501 ]
517502 . into ( )
518503 }
504+ DType :: List ( ..) | DType :: FixedSizeList ( ..) => {
505+ // List supports: Compress, Slice, Take, Filter, MinMax, Mask, ScalarAt
506+ // Does NOT support: SearchSorted, Compare, Cast, Sum, FillNull
507+ [ Compress , Slice , Take , Filter , MinMax , Mask , ScalarAt ] . into ( )
508+ }
509+ DType :: Struct ( sdt, _) => {
510+ // Struct supports: Compress, Slice, Take, Filter, MinMax, Mask, ScalarAt
511+ // Does NOT support: SearchSorted (requires scalar comparison), Compare, Cast, Sum, FillNull
512+ let struct_actions = [ Compress , Slice , Take , Filter , MinMax , Mask , ScalarAt ] ;
513+ sdt. fields ( )
514+ . map ( |child| actions_for_dtype ( & child) )
515+ . fold ( struct_actions. into ( ) , |acc, actions| {
516+ acc. intersection ( & actions) . copied ( ) . collect ( )
517+ } )
518+ }
519+ DType :: Union ( ..) => todo ! ( "TODO(connor)[Union]: unimplemented" ) ,
519520 DType :: Extension ( _) => {
520521 // Extension types delegate to storage dtype, support most operations
521522 ActionType :: iter ( ) . collect ( )
0 commit comments