@@ -8,7 +8,7 @@ pub struct ArrowErrorProto {
88 pub ctx : Option < String > ,
99 #[ prost(
1010 oneof = "ArrowErrorInnerProto" ,
11- tags = "2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19"
11+ tags = "2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 "
1212 ) ]
1313 pub inner : Option < ArrowErrorInnerProto > ,
1414}
@@ -51,6 +51,8 @@ pub enum ArrowErrorInnerProto {
5151 DictionaryKeyOverflowError ( bool ) ,
5252 #[ prost( bool , tag = "19" ) ]
5353 RunEndIndexOverflowError ( bool ) ,
54+ #[ prost( uint64, tag = "20" ) ]
55+ OffsetOverflowError ( u64 ) ,
5456}
5557
5658impl ArrowErrorProto {
@@ -131,9 +133,7 @@ impl ArrowErrorProto {
131133 ctx : ctx. cloned ( ) ,
132134 } ,
133135 ArrowError :: OffsetOverflowError ( offset) => ArrowErrorProto {
134- inner : Some ( ArrowErrorInnerProto :: ParseError ( format ! (
135- "Offset overflow error: {offset}"
136- ) ) ) ,
136+ inner : Some ( ArrowErrorInnerProto :: OffsetOverflowError ( * offset as u64 ) ) ,
137137 ctx : ctx. cloned ( ) ,
138138 } ,
139139 }
@@ -182,6 +182,9 @@ impl ArrowErrorProto {
182182 ArrowErrorInnerProto :: RunEndIndexOverflowError ( _) => {
183183 ArrowError :: RunEndIndexOverflowError
184184 }
185+ ArrowErrorInnerProto :: OffsetOverflowError ( offset) => {
186+ ArrowError :: OffsetOverflowError ( * offset as usize )
187+ }
185188 } ;
186189 ( err, self . ctx . clone ( ) )
187190 }
@@ -220,6 +223,7 @@ mod tests {
220223 ArrowError :: CDataInterface ( "cdata error" . to_string( ) ) ,
221224 ArrowError :: DictionaryKeyOverflowError ,
222225 ArrowError :: RunEndIndexOverflowError ,
226+ ArrowError :: OffsetOverflowError ( 12345 ) ,
223227 ] ;
224228
225229 for original_error in test_cases {
0 commit comments