amogh-jahagirdar commented on code in PR #12928: URL: https://github.com/apache/iceberg/pull/12928#discussion_r2070346566
########## arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedArrowReader.java: ########## @@ -567,6 +608,138 @@ public void close() { } } + private static final class RowIdVectorReader extends VectorizedArrowReader { + private static final Field ROW_ID_ARROW_FIELD = ArrowSchemaUtil.convert(MetadataColumns.ROW_ID); + + private final long firstRowId; + private final VectorizedReader<VectorHolder> idReader; + private final VectorizedReader<VectorHolder> posReader; + private NullabilityHolder nulls; + + private RowIdVectorReader(long firstRowId, VectorizedArrowReader idReader) { + this.firstRowId = firstRowId; + this.idReader = idReader != null ? idReader : nulls(); + this.posReader = new PositionVectorReader(true); + } + + @Override + public VectorHolder read(VectorHolder reuse, int numValsToRead) { + FieldVector positions = posReader.read(null, numValsToRead).vector(); + VectorHolder ids = idReader.read(null, numValsToRead); Review Comment: On second look, we should be closing these after we we go through the batch. Same with the last udpate seq case, I'll fix this -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org