jhorstmann commented on issue #12364:
URL: https://github.com/apache/arrow-rs/issues/12364#issuecomment-7112721030

   Maybe the simplest solution would be to add the binary extension field to 
relevant thrift structs, behind a feature:
   
   ```rust
   thrift_struct!(
   pub(crate) struct PageHeader {
     1: required PageType r#type
     ...
     #[cfg(feature = "thrift_metadata_extensions")]
     32767: optional binary extension
   }
   );
   ```
   
   Just for `PageHeader` I also think parsing it twice wouldn't add much 
overhead, the question then would be more about how to integrate that with apis 
like `SerializedPageReader`, or how to enable writing the extension. If the 
thrift macros were available behind an experimental feature, you could define
   
   ```rust
   thrift_struct!(
   pub(crate) struct PageHeaderExtension {
     32767: optional binary extension
   }
   );
   ```
   and use that to parse only the extension, then reset the position of the 
input and re-parse the regular data. Question again would be how to integrate 
that with a `SerializedPageReader`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to