shangxinli opened a new pull request, #445:
URL: https://github.com/apache/iceberg-cpp/pull/445
Implement direct Avro encoder to eliminate GenericDatum intermediate layer,
matching the decoder approach for better performance.
Implementation:
- Add avro_direct_encoder_internal.h with EncodeArrowToAvro API
- Add avro_direct_encoder.cc implementing direct Arrow→Avro encoding
- All primitive types: bool, int, long, float, double, string, binary
- Temporal types: date, time, timestamp
- Logical types: uuid, decimal
- Nested types: struct, list, map (both string and non-string keys)
- Union type handling for optional fields
- Modify avro_writer.cc to use DataFileWriterBase with direct encoder
- Add EncodeContext to reuse scratch buffers and avoid allocations
This matches Java Iceberg implementation using Encoder interface directly,
avoiding intermediate object allocation overhead.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]