@@ -11,13 +11,12 @@ use vortex_array::serde::ArrayChildren;
1111use vortex_array:: stats:: { ArrayStats , StatsSetRef } ;
1212use vortex_array:: validity:: Validity ;
1313use vortex_array:: vtable:: {
14- ArrayVTable , CanonicalVTable , EncodeVTable , NotSupported , VTable , ValidityChild ,
15- ValidityVTableFromChild , VisitorVTable ,
14+ ArrayId , ArrayVTable , ArrayVTableExt , BaseArrayVTable , CanonicalVTable , EncodeVTable ,
15+ NotSupported , VTable , ValidityChild , ValidityVTableFromChild , VisitorVTable ,
1616} ;
1717use vortex_array:: {
1818 Array , ArrayBufferVisitor , ArrayChildVisitor , ArrayEq , ArrayHash , ArrayRef , Canonical ,
19- DeserializeMetadata , EncodingId , EncodingRef , Precision , ProstMetadata , SerializeMetadata ,
20- ToCanonical , vtable,
19+ DeserializeMetadata , Precision , ProstMetadata , SerializeMetadata , ToCanonical , vtable,
2120} ;
2221use vortex_buffer:: { Buffer , ByteBuffer } ;
2322use vortex_dtype:: { DType , Nullability , PType } ;
@@ -43,7 +42,7 @@ pub struct ALPRDMetadata {
4342
4443impl VTable for ALPRDVTable {
4544 type Array = ALPRDArray ;
46- type Encoding = ALPRDEncoding ;
45+
4746 type Metadata = ProstMetadata < ALPRDMetadata > ;
4847
4948 type ArrayVTable = Self ;
@@ -55,12 +54,12 @@ impl VTable for ALPRDVTable {
5554 type EncodeVTable = Self ;
5655 type OperatorVTable = NotSupported ;
5756
58- fn id ( _encoding : & Self :: Encoding ) -> EncodingId {
59- EncodingId :: new_ref ( "vortex.alprd" )
57+ fn id ( & self ) -> ArrayId {
58+ ArrayId :: new_ref ( "vortex.alprd" )
6059 }
6160
62- fn encoding ( _array : & Self :: Array ) -> EncodingRef {
63- EncodingRef :: new_ref ( ALPRDEncoding . as_ref ( ) )
61+ fn encoding ( _array : & Self :: Array ) -> ArrayVTable {
62+ ALPRDVTable . as_vtable ( )
6463 }
6564
6665 fn metadata ( array : & ALPRDArray ) -> VortexResult < Self :: Metadata > {
@@ -94,7 +93,7 @@ impl VTable for ALPRDVTable {
9493 }
9594
9695 fn build (
97- _encoding : & ALPRDEncoding ,
96+ & self ,
9897 dtype : & DType ,
9998 len : usize ,
10099 metadata : & Self :: Metadata ,
@@ -176,7 +175,7 @@ pub struct ALPRDArray {
176175}
177176
178177#[ derive( Clone , Debug ) ]
179- pub struct ALPRDEncoding ;
178+ pub struct ALPRDVTable ;
180179
181180impl ALPRDArray {
182181 /// Build a new `ALPRDArray` from components.
@@ -308,7 +307,7 @@ impl ValidityChild<ALPRDVTable> for ALPRDVTable {
308307 }
309308}
310309
311- impl ArrayVTable < ALPRDVTable > for ALPRDVTable {
310+ impl BaseArrayVTable < ALPRDVTable > for ALPRDVTable {
312311 fn len ( array : & ALPRDArray ) -> usize {
313312 array. left_parts . len ( )
314313 }
@@ -382,7 +381,7 @@ impl CanonicalVTable<ALPRDVTable> for ALPRDVTable {
382381
383382impl EncodeVTable < ALPRDVTable > for ALPRDVTable {
384383 fn encode (
385- _encoding : & ALPRDEncoding ,
384+ _vtable : & ALPRDVTable ,
386385 canonical : & Canonical ,
387386 like : Option < & ALPRDArray > ,
388387 ) -> VortexResult < Option < ALPRDArray > > {
0 commit comments