File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -732,8 +732,8 @@ impl ArrayRef {
732732 /// Returns the nth child of the array without allocating a Vec.
733733 ///
734734 /// Returns `None` if the index is out of bounds.
735- pub fn nth_child ( & self , idx : usize ) -> Option < ArrayRef > {
736- self . children_iter ( ) . nth ( idx) . cloned ( )
735+ pub fn nth_child ( & self , idx : usize ) -> Option < & ArrayRef > {
736+ self . children_iter ( ) . nth ( idx)
737737 }
738738
739739 /// Returns the names of the children of the array: the slot names of the non-None slots
Original file line number Diff line number Diff line change 9393 }
9494 }
9595
96- <V as MaskReduce >:: mask ( array, & mask_child)
96+ <V as MaskReduce >:: mask ( array, mask_child)
9797 }
9898}
9999
@@ -121,7 +121,7 @@ where
121121 let mask_child = parent
122122 . nth_child ( 1 )
123123 . ok_or_else ( || vortex_err ! ( "Mask expression must have 2 children" ) ) ?;
124- <V as MaskKernel >:: mask ( array, & mask_child, ctx)
124+ <V as MaskKernel >:: mask ( array, mask_child, ctx)
125125 }
126126}
127127
Original file line number Diff line number Diff line change @@ -376,14 +376,14 @@ impl ReduceNode for ArrayReduceNode<'_> {
376376 let array = match & self . array {
377377 Cow :: Borrowed ( array) => Cow :: Borrowed (
378378 array
379- . children_iter ( )
380- . nth ( idx)
379+ . nth_child ( idx)
381380 . vortex_expect ( "child idx out of bounds" ) ,
382381 ) ,
383382 Cow :: Owned ( array) => Cow :: Owned (
384383 array
385384 . nth_child ( idx)
386- . vortex_expect ( "child idx out of bounds" ) ,
385+ . vortex_expect ( "child idx out of bounds" )
386+ . clone ( ) ,
387387 ) ,
388388 } ;
389389 Self { array }
You can’t perform that action at this time.
0 commit comments