apache/iceberg · error · ParquetDecodingException
Can't read value in column %s at value %d out of %d in curre
Error message
Can't read value in column %s at value %d out of %d in current page. repetition level: %d, definition level: %d
What it means
Generic decoding failure wrapper: when a runtime exception occurs while reading a value and it is not attributable to PARQUET-246, PageIterator rethrows it as ParquetDecodingException describing the column, the value index within the page, and the current repetition/definition levels. This pinpoints where in the page decoding broke.
Source
Thrown at parquet/src/main/java/org/apache/iceberg/parquet/PageIterator.java:225
if (CorruptDeltaByteArrays.requiresSequentialReads(writerVersion, valueEncoding)
&& exception instanceof ArrayIndexOutOfBoundsException) {
// this is probably PARQUET-246, which may happen if reading data with
// MR because this can't be detected without reading all footers
throw new ParquetDecodingException(
"Read failure possibly due to " + "PARQUET-246: try setting parquet.split.files to false",
new ParquetDecodingException(
String.format(
Locale.ROOT,
"Can't read value in column %s at value %d out of %d in current page. "
+ "repetition level: %d, definition level: %d",
desc,
triplesRead,
triplesCount,
currentRL,
currentDL),
exception));
}
throw new ParquetDecodingException(
String.format(
Locale.ROOT,
"Can't read value in column %s at value %d out of %d in current page. "
+ "repetition level: %d, definition level: %d",
desc,
triplesRead,
triplesCount,
currentRL,
currentDL),
exception);
}
@Override
protected void initDataReader(Encoding dataEncoding, ByteBufferInputStream in, int valueCount) {
ValuesReader previousReader = values;
this.valueEncoding = dataEncoding;
View on GitHub (pinned to 86d9c8fc54)
Solutions
- Inspect the reported column and value index for file corruption; validate the file with parquet-tools
- Re-read or rewrite the corrupted file from source
- If caused by splitting, disable file splitting (see PARQUET-246)
Example fix
// before // crash decoding corrupt file // after // validate and rewrite // parquet-tools repair corrupt.parquet repaired.parquet
Defensive patterns
Strategy: try-catch
Validate before calling
if (!ParquetFileReader.readFooter(conf, path).getFileMetaData().getSchema().equals(expectedSchema)) throw new IllegalStateException("Schema mismatch"); Try / catch
try {
iterator.nextLong();
} catch (ParquetDecodingException e) {
// message includes column, value index, RL/DL — log and quarantine file
LOG.error("Decoding failed: {}", e.getMessage());
} Prevention
- Validate Parquet file integrity (checksums) after upload/copy
- Watch for truncation when copying files to object storage
- Use parquet-tools to verify files before registering with Iceberg
When it happens
Trigger: Any RuntimeException surfaced from nextBoolean/nextInteger/nextLong/nextFloat/nextDouble/nextBinary that fails the PARQUET-246 check (e.g. IO problems, corrupt page buffers).
Common situations: Truncated or corrupt Parquet files; page data inconsistent with the page header's value counts; mismatched footer/split reads.
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
- not a valid mode " + this.mode
- No more values to read. Total values read: " + valuesRead +
- 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
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/17921586c92d3abf.
Report an issue: GitHub.