Ji Liu created ARROW-7539:
-----------------------------
Summary: [Java] FieldVector getFieldBuffers API should not set
reader/writer indices
Key: ARROW-7539
URL: https://issues.apache.org/jira/browse/ARROW-7539
Project: Apache Arrow
Issue Type: Bug
Components: Java
Reporter: Ji Liu
Assignee: Ji Liu
Per discussion
[https://github.com/apache/arrow/pull/6133#discussion_r364906302].
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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)