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

   Let me know if I can support in any way.
   
   Unfortunately the macro-based generator currently does not support borrowing 
from the input. I think that would be a bit difficult to add, as soon as any of 
the types wants to borrow, all the structs it is used in also need a lifetime 
parameter. But I can't just add this unconditionally, as unused lifetimes are 
an error. The runtime code supports borrowing though.
   
   On the other hand, the macro approach allows to easily replace one of the 
types with a custom implementation. For example you could do `impl 
CompactThriftProtocol for ParquetSchema` and then replace
   ```
   2: required list<SchemaElement> schema;
   ```
   with
   ```
   2: required ParquetSchema schema;
   ```
   
   Other fields that might benefit from custom implementations are statistics, 
size_statistics and encoding_stats.
   
   Another sidenote, there is a mostly redundant `required list<string> 
path_in_schema` in `ColumnMetaData`, removing that field so it gets skipped and 
needs no allocations was a 5% performance improvement if I remember correctly.


-- 
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