RussellSpitzer commented on code in PR #10943: URL: https://github.com/apache/iceberg/pull/10943#discussion_r1777410265
########## arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedColumnIterator.java: ########## @@ -69,12 +69,20 @@ public boolean producesDictionaryEncodedVector() { } public abstract class BatchReader { - public void nextBatch(FieldVector fieldVector, int typeWidth, NullabilityHolder holder) { + public void nextBatch( + int numValsToRead, FieldVector fieldVector, int typeWidth, NullabilityHolder holder) { int rowsReadSoFar = 0; - while (rowsReadSoFar < batchSize && hasNext()) { + while (rowsReadSoFar < batchSize && hasNext() && rowsReadSoFar < numValsToRead) { advance(); + int expectedBatchSize; + if (numValsToRead < 0) { + throw new IllegalStateException("numValsToRead has invalid value"); Review Comment: "Cannot X (because Y) (recover by Z)" - > "Cannot read a negative number of values. numValsToRead = %D" -- 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