Commit 3bef63b 1 parent bef0ae6 commit 3bef63b Copy full SHA for 3bef63b
File tree 1 file changed +4
-4
lines changed
vortex-array/src/array/bool/compute
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,16 @@ impl TakeFn for BoolArray {
12
12
let validity = self . validity ( ) ;
13
13
let indices = indices. clone ( ) . into_primitive ( ) ?;
14
14
match_each_integer_ptype ! ( indices. ptype( ) , |$I | {
15
- Ok ( BoolArray :: from_vec (
15
+ Ok ( BoolArray :: try_new (
16
16
take_bool( & self . boolean_buffer( ) , indices. maybe_null_slice:: <$I >( ) ) ,
17
17
validity. take( indices. as_ref( ) ) ?,
18
- ) . into_array( ) )
18
+ ) ? . into_array( ) )
19
19
} )
20
20
}
21
21
}
22
22
23
- fn take_bool < I : AsPrimitive < usize > > ( bools : & BooleanBuffer , indices : & [ I ] ) -> Vec < bool > {
24
- indices. iter ( ) . map ( | & idx| bools. value ( idx. as_ ( ) ) ) . collect ( )
23
+ fn take_bool < I : AsPrimitive < usize > > ( bools : & BooleanBuffer , indices : & [ I ] ) -> BooleanBuffer {
24
+ BooleanBuffer :: collect_bool ( indices. len ( ) , | idx| bools. value ( indices [ idx] . as_ ( ) ) )
25
25
}
26
26
27
27
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments