apache / apache/arrow-java

[Java] FieldVector getFieldBuffers API should not set reader/writer indices

未关闭
#270 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Type: bug
主要语言
Java
星标
94
派生
152
平均合并
3 天 16 小时
30 天内合并 PR
11

描述

Per discussion .

The fact that we have reader/writer settings in `getFieldBuffers` is wrong. To clarify, `getFieldBuffers` is distinct from `getBuffers`. The former should be for getting access to underlying data for higher-performance algorithms. The latter is for sending the data over the wire. Seems we've mixed up use of both.

 

Currently in `VectorUnloader`, we used `getFieldBuffers` to create `ArrowRecordBatch` that’s why we keep writer/reader indices in `getFieldBuffers`, we should use `getBuffers` instead.

**Reporter**: [Ji Liu](https://issues.apache.org/jira/browse/ARROW-7539) / @tianchen92
#### PRs and other links:
- [GitHub Pull Request apache/arrow#6156](https://github.com/apache/arrow/pull/6156)

**Note**: *This issue was originally created as [ARROW-7539](https://issues.apache.org/jira/browse/ARROW-7539). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

贡献指南

打开贡献指南

调研方向

从 VectorUnloader 开始,比较其在创建 ArrowRecordBatch 实例时对 getFieldBuffers 和 getBuffers 的使用。阅读 issue 中链接的 FieldVector API 讨论,然后验证 getFieldBuffers 提供底层数据且不会更改读写索引,而 record-batch 序列化使用 getBuffers。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
data
Issue 类型
重构
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。