File tree Expand file tree Collapse file tree
vortex-layout/src/layouts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ pub struct ALPRDMetadata {
6666 dict_len : u32 ,
6767 #[ prost( uint32, repeated, tag = "3" ) ]
6868 dict : Vec < u32 > ,
69- #[ prost( enumeration = "PType" , tag = "4" ) ]
69+ #[ prost( int32 , tag = "4" ) ]
7070 left_parts_ptype : i32 ,
7171 #[ prost( message, tag = "5" ) ]
7272 patches : Option < PatchesMetadata > ,
Original file line number Diff line number Diff line change @@ -52,11 +52,11 @@ pub struct RLEMetadata {
5252 pub values_len : u64 ,
5353 #[ prost( uint64, tag = "2" ) ]
5454 pub indices_len : u64 ,
55- #[ prost( enumeration = "PType" , tag = "3" ) ]
55+ #[ prost( int32 , tag = "3" ) ]
5656 pub indices_ptype : i32 ,
5757 #[ prost( uint64, tag = "4" ) ]
5858 pub values_idx_offsets_len : u64 ,
59- #[ prost( enumeration = "PType" , tag = "5" ) ]
59+ #[ prost( int32 , tag = "5" ) ]
6060 pub values_idx_offsets_ptype : i32 ,
6161 #[ prost( uint64, tag = "6" , default = "0" ) ]
6262 pub offset : u64 ,
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pub type RunEndArray = Array<RunEnd>;
6262
6363#[ derive( Clone , prost:: Message ) ]
6464pub struct RunEndMetadata {
65- #[ prost( enumeration = "PType" , tag = "1" ) ]
65+ #[ prost( int32 , tag = "1" ) ]
6666 pub ends_ptype : i32 ,
6767 #[ prost( uint64, tag = "2" ) ]
6868 pub num_runs : u64 ,
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ pub(crate) fn initialize(session: &VortexSession) {
5353// The type of the values can be determined by looking at the type info...right?
5454#[ derive( prost:: Message ) ]
5555pub struct DecimalMetadata {
56- #[ prost( enumeration = "DecimalType" , tag = "1" ) ]
56+ #[ prost( int32 , tag = "1" ) ]
5757 pub ( super ) values_type : i32 ,
5858}
5959
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ use crate::match_each_integer_ptype;
3131pub struct DictMetadata {
3232 #[ prost( uint32, tag = "1" ) ]
3333 pub ( super ) values_len : u32 ,
34- #[ prost( enumeration = "PType" , tag = "2" ) ]
34+ #[ prost( int32 , tag = "2" ) ]
3535 pub ( super ) codes_ptype : i32 ,
3636 // nullable codes are optional since they were added after stabilisation.
3737 #[ prost( optional, bool , tag = "3" ) ]
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ pub type ListArray = Array<List>;
5050pub struct ListMetadata {
5151 #[ prost( uint64, tag = "1" ) ]
5252 elements_len : u64 ,
53- #[ prost( enumeration = "PType" , tag = "2" ) ]
53+ #[ prost( int32 , tag = "2" ) ]
5454 offset_ptype : i32 ,
5555}
5656
Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ pub struct ListView;
5858pub struct ListViewMetadata {
5959 #[ prost( uint64, tag = "1" ) ]
6060 elements_len : u64 ,
61- #[ prost( enumeration = "PType" , tag = "2" ) ]
61+ #[ prost( int32 , tag = "2" ) ]
6262 offset_ptype : i32 ,
63- #[ prost( enumeration = "PType" , tag = "3" ) ]
63+ #[ prost( int32 , tag = "3" ) ]
6464 size_ptype : i32 ,
6565}
6666
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ pub(crate) fn initialize(session: &VortexSession) {
6060
6161#[ derive( Clone , prost:: Message ) ]
6262pub struct VarBinMetadata {
63- #[ prost( enumeration = "PType" , tag = "1" ) ]
63+ #[ prost( int32 , tag = "1" ) ]
6464 pub ( crate ) offsets_ptype : i32 ,
6565}
6666
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ impl Layout<Dict> {
164164
165165#[ derive( prost:: Message ) ]
166166pub struct DictLayoutMetadata {
167- #[ prost( enumeration = "PType" , tag = "1" ) ]
167+ #[ prost( int32 , tag = "1" ) ]
168168 codes_ptype : i32 ,
169169 #[ prost( optional, bool , tag = "2" ) ]
170170 is_nullable_codes : Option < bool > ,
@@ -174,9 +174,10 @@ pub struct DictLayoutMetadata {
174174
175175impl DictLayoutMetadata {
176176 pub fn new ( codes_ptype : PType ) -> Self {
177- let mut metadata = Self :: default ( ) ;
178- metadata. set_codes_ptype ( codes_ptype) ;
179- metadata
177+ Self {
178+ codes_ptype : codes_ptype as i32 ,
179+ ..Default :: default ( )
180+ }
180181 }
181182
182183 fn get_codes_ptype ( & self ) -> VortexResult < PType > {
Original file line number Diff line number Diff line change @@ -226,15 +226,15 @@ impl Layout<List> {
226226
227227#[ derive( prost:: Message ) ]
228228pub struct ListLayoutMetadata {
229- #[ prost( enumeration = "PType" , tag = "1" ) ]
229+ #[ prost( int32 , tag = "1" ) ]
230230 offsets_ptype : i32 ,
231231}
232232
233233impl ListLayoutMetadata {
234234 pub fn new ( offsets_ptype : PType ) -> Self {
235- let mut metadata = Self :: default ( ) ;
236- metadata . set_offsets_ptype ( offsets_ptype) ;
237- metadata
235+ Self {
236+ offsets_ptype : offsets_ptype as i32 ,
237+ }
238238 }
239239
240240 fn get_offsets_ptype ( & self ) -> VortexResult < PType > {
You can’t perform that action at this time.
0 commit comments