zhixingheyi-tian commented on PR #14353:
URL: https://github.com/apache/arrow/pull/14353#issuecomment-1353179807
> Instead of defining entire separate classes for this, why not change
`EncodingTraits::Accumulator` to the following:
>
> ```c++
> template <>
> struct EncodingTraits<ByteArrayType> {
> // ...
> struct Accumulator {
> std::unique_ptr<::arrow::Int32Builder> offsets_builder;
> std::unique_ptr<::arrow::BufferBuilder> data_builder;
> std::vector<std::shared_ptr<::arrow::Array>> chunks;
> };
> ```
If use *Builder, may add extra data copy when accumulating element.
Can refer to fixed width usage :
https://github.com/apache/arrow/blob/5ce8d79d7ae4b3864226cc3c5480fa8eba2e571d/cpp/src/parquet/encoding.cc#L1062-L1070
Thanks!
--
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]