apache/iceberg · error · ParquetDecodingException

Error reading mini block.

Error message

Error reading mini block.

What it means

While streaming mini blocks of a DELTA_BINARY_PACKED page into the Arrow output vector, loadMiniBlockToOutput may throw IOException from the underlying stream. The reader wraps it in ParquetDecodingException with this message, preserving the cause. It means the encoded mini-block bytes could not be read from the page's input stream.

Source

Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedDeltaEncodedValuesReader.java:164

              + " 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--;
    }

    while (remaining > 0) {
      int loadedRows;
      try {
        loadedRows = loadMiniBlockToOutput(remaining, vec, currentRowId, typeWidth, outputWriter);
      } catch (IOException e) {
        throw new ParquetDecodingException("Error reading mini block.", e);
      }
      currentRowId += loadedRows;
      remaining -= loadedRows;
    }
    valuesRead = total - remaining;
  }

  /**
   * Read from a mini block. Read at most 'remaining' values into output.
   *
   * @return the number of values read into output
   */
  private int loadMiniBlockToOutput(
      int remaining, FieldVector vec, int rowId, int typeWidth, IntegerOutputWriter outputWriter)
      throws IOException {

    // new block; read the block header
    if (remainingInBlock == 0) {

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Retry the query to rule out transient IO/network errors (especially on object storage).
  2. Verify file integrity; truncated files must be re-written from source data.
  3. Check storage-layer logs (S3/HDFS) for read failures and fix connectivity or permissions.
  4. Disable vectorized reads as a temporary workaround if the plain reader can handle the file.
Defensive patterns

Strategy: retry

Try / catch

try {
  // vectorized read
} catch (ParquetDecodingException e) {
  if (e.getMessage().equals("Error reading mini block.") && attempt < maxAttempts) {
    // retry — likely transient storage IO error
  } else throw e;
}

Prevention

When it happens

Trigger: loadMiniBlockToOutput raises IOException mid-page while reading delta-encoded int/long values into an Arrow vector.

Common situations: Truncated or corrupted files (HDFS/S3 reads failing mid-page), network/IO errors during scan, or a page whose mini-block data ends earlier than the header promised.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


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