rdblue commented on a change in pull request #1334:
URL: https://github.com/apache/iceberg/pull/1334#discussion_r473124123
##########
File path: data/src/main/java/org/apache/iceberg/data/orc/GenericOrcWriters.java
##########
@@ -231,7 +231,14 @@ public void nonNullWrite(int rowId, String data,
ColumnVector output) {
@Override
public void nonNullWrite(int rowId, ByteBuffer data, ColumnVector output) {
- ((BytesColumnVector) output).setRef(rowId, data.array(), 0,
data.array().length);
+ ByteBuffer dupe = data.duplicate();
+ if (dupe.hasArray()) {
+ ((BytesColumnVector) output).setRef(rowId, dupe.array(),
dupe.arrayOffset(), dupe.remaining());
Review comment:
The offset should be `dupe.arrayOffset() + dupe.position()`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]