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