apache/iceberg · error · ParquetDecodingException
No more values to read. Total values read: " + valuesRead +
Error message
No more values to read. Total values read: " + valuesRead + ", total count: " + totalValueCount + ", trying to read " + total + " more.
What it means
readValues validates that the requested number of values fits within the page's declared total value count before decoding DELTA_BINARY_PACKED data into an Arrow vector. If the caller asks for more values than remain (valuesRead + total > totalValueCount), the reader throws ParquetDecodingException. This guards against decoding past the end of a page, which usually means corrupt or inconsistent page metadata.
Source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java:139
int[] result = new int[total];
readValues(
total,
null,
rowId,
INT_SIZE,
(vec, idx, val) -> result[(int) (idx / INT_SIZE)] = (int) val);
return result;
}
@Override
public void readLongs(int total, FieldVector vec, int rowId) {
readValues(total, vec, rowId, LONG_SIZE, (f, i, v) -> f.getDataBuffer().setLong(i, v));
}
private void readValues(
int total, FieldVector vec, int rowId, int typeWidth, IntegerOutputWriter outputWriter) {
if (valuesRead + total > totalValueCount) {
throw new ParquetDecodingException(
"No more values to read. Total values read: "
+ valuesRead
+ ", total count: "
+ totalValueCount
+ ", trying to read "
+ total
+ " more.");
}
int remaining = total;
int currentRowId = rowId;
// First value
if (valuesRead == 0 && total > 0) {
outputWriter.write(vec, ((long) (currentRowId + valuesRead) * typeWidth), firstValue);
lastValueRead = firstValue;
currentRowId++;
remaining--;
}View on GitHub (pinned to 86d9c8fc54)
Solutions
- Validate/repair the Parquet file (e.g. rewrite it with a trusted writer such as Spark/Iceberg rewrite) since this usually indicates a corrupt page.
- Update the writer that produced the files; mismatched totalValueCount points to a writer bug.
- If reproducible on a specific library version, upgrade Iceberg/Parquet to get fixed batch-size handling, or disable vectorized reads as a workaround.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// vectorized read of delta-encoded page
} catch (ParquetDecodingException e) {
if (e.getMessage().startsWith("No more values to read")) {
// treat file as corrupt: quarantine and rewrite, or retry with non-vectorized reader
} else throw e;
} Prevention
- Validate files after writing (Parquet file metadata checks) before committing
- Keep writer and reader library versions aligned
- Monitor storage for truncated files from failed/partial uploads
When it happens
Trigger: Calling readInteger/readLong/readIntegers/readLongs (via the vectorized page iterator) with a batch total that exceeds the remaining values in the current page.
Common situations: Corrupted or truncated Parquet files, files written by buggy writers that misstate totalValueCount, or memory-pressure paths that request larger batches than the page contains.
Understand the failure class
Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.
Related errors
- not a valid mode " + this.mode
- Can not read min delta in current block
- Can not decode bitwidth in block header
- Read failure possibly due to PARQUET-246: try setting parque
- Can't read value in column %s at value %d out of %d in curre
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/9471ab899f84c6e5.
Report an issue: GitHub.