File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
vortex-array/src/arrays/primitive/vtable Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 44use vortex_buffer:: { Alignment , Buffer , ByteBuffer } ;
55use vortex_dtype:: { DType , PType , match_each_native_ptype} ;
66use vortex_error:: { VortexResult , vortex_bail} ;
7+ use vortex_vector:: Vector ;
8+ use vortex_vector:: primitive:: PVector ;
79
810use crate :: arrays:: PrimitiveArray ;
11+ use crate :: execution:: ExecutionCtx ;
912use crate :: serde:: ArrayChildren ;
1013use crate :: validity:: Validity ;
1114use crate :: vtable:: { NotSupported , VTable , ValidityVTableFromValidityHelper } ;
@@ -99,6 +102,12 @@ impl VTable for PrimitiveVTable {
99102 Ok ( PrimitiveArray :: new( buffer, validity) )
100103 } )
101104 }
105+
106+ fn execute ( array : & Self :: Array , _ctx : & mut dyn ExecutionCtx ) -> VortexResult < Vector > {
107+ Ok ( match_each_native_ptype ! ( array. ptype( ) , |T | {
108+ PVector :: new( array. buffer:: <T >( ) , array. validity_mask( ) ) . into( )
109+ } ) )
110+ }
102111}
103112
104113#[ derive( Clone , Debug ) ]
You can’t perform that action at this time.
0 commit comments