yangshangqing95 commented on code in PR #17663:
URL: https://github.com/apache/iceberg/pull/17663#discussion_r3798123231
##########
arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedArrowReader.java:
##########
@@ -694,8 +696,17 @@ public VectorHolder read(VectorHolder reuse, int
numValsToRead) {
}
ArrowBuf dataBuffer = vec.getDataBuffer();
- for (int i = 0; i < numValsToRead; i += 1) {
- dataBuffer.setLong((long) i * Long.BYTES, rowStart + i);
+
+ if (rowIndexes != null) {
Review Comment:
My thinking is that, logically, the preferred approach would be to get the
sequence number from the row indexes rather than incrementing it manually. So,
from a code-flow perspective, I’d lean toward putting the != null check first.
That also feels more intuitive to me, but I’d be very interested to hear your
thoughts.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]