apache / apache/arrow-java

How to iterate over a record batch?

オープン
#468 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
Type: usage
主要言語
Java
スター
94
フォーク
152
平均マージ
3日 16時間
マージ済み PR(30日)
11

説明

### Describe the usage question you have. Please include as many useful details as possible.

Now I have a `VectorSchemaRoot`. I can see to iterate over the batch with `getVector` and then `getObject`.

But the return value is of type `Obejct`. And I wonder how I can downcast it for some useful class I can retrieve the real value (string, int, float, etc.).

I know we have the field info of each vetcor, but I don't know the mapping between field type to real Java class. It looks over challenge to remember all the mapping by reverse engineering the code, and it may change as version evolves.

I checked https://arrow.apache.org/docs/java/index.html but all the pages tell about constructing a batch and how to move it from one place to another, rather than tell about how to read and dump a batch to a typed two-dimensional matrix.

The most trivial usage, `contentToTSVString`, call `Object::toString` on each cell. But I don't thing we should convert all the values to String and reparse it to concrete type.

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

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

調査の方向性

まず、issue に記載されている VectorSchemaRoot、getVector、getObject、contentToTSVString の使用方法を確認し、そこからリンクされている Java ドキュメントと比較します。各ベクトルを具体的な Java 型で読み取る、ドキュメントに記載された方法を特定し、新しいコントリビューターが型の対応関係をリバースエンジニアリングしたり、文字列を再解析したりせずにバッチを反復処理できるようになれば、作業完了とみなします。

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

評価

技術スタック
java
領域
data
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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