How to iterate over a record batch?
- 主要語言
- Java
- 星號
- 94
- 分支
- 152
- 平均合併
- 3 天 16 小時
- 30 天內合併 PR
- 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 型別讀取每個向量的方法,並以新貢獻者能夠遍歷一個 batch、無需透過逆向工程推斷型別對應或重新解析字串為工作完成的標準。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- data
- Issue 類型
- 文件
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100