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

  1. 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.
  2. Update the writer that produced the files; mismatched totalValueCount points to a writer bug.
  3. 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

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


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/9471ab899f84c6e5. Report an issue: GitHub.