apache / apache/parquet-java

Avoid Copy of Bytes in Protobuf BinaryWriter

オープン
#2,527 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
Component: Parquet Priority: Minor Type: enhancement
主要言語
Java
スター
3.1k
フォーク
1.6k
平均マージ
3日 12時間
マージ済み PR(30日)
33

説明

```java

class BinaryWriter extends FieldWriter {
@Override
final void writeRawValue(Object value) {
ByteString byteString = (ByteString) value;
Binary binary = Binary.fromConstantByteArray(byteString.toByteArray());
recordConsumer.addBinary(binary);
}
}
```

`toByteArray()` creates a copy of the buffer. There is already support with Parquet and Protobuf to pass instead a ByteBuffer which avoids the copy.

**Reporter**: [David Mollitor](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=belugabehr) / @belugabehr
**Assignee**: [David Mollitor](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=belugabehr) / @belugabehr
#### Related issues:
- [Move Support for ByteBuffer into TTransport](https://issues.apache.org/jira/browse/THRIFT-5288) (is blocked by)

**Note**: *This issue was originally created as [PARQUET-1918](https://issues.apache.org/jira/browse/PARQUET-1918). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Start at BinaryWriter.writeRawValue, where ByteString.toByteArray() is used, and review the existing Parquet and Protobuf ByteBuffer support. Check the related THRIFT-5288 issue because the requested support is blocked there. Done means the binary value can be passed without copying the ByteString buffer.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
backend
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。