apache/iceberg · error · ParquetDecodingException
could not read page in col " + desc + " as the dictionary wa
Error message
could not read page in col " + desc + " as the dictionary was missing for encoding " + dataEncoding
What it means
VectorizedPageIterator.initDataReader starts decoding a data page whose encoding uses a dictionary, but no dictionary has been set for this column chunk. Iceberg throws ParquetDecodingException because dictionary-encoded pages cannot be decoded without their dictionary page. This usually means the dictionary page was skipped, lost, or the file is malformed.
Source
Thrown at arrow/src/main/java/org/apache/iceberg/arrow/vectorized/parquet/VectorizedPageIterator.java:77
private DictionaryDecodeMode dictionaryDecodeMode;
public void setAllPagesDictEncoded(boolean allDictEncoded) {
this.allPagesDictEncoded = allDictEncoded;
}
@Override
protected void reset() {
super.reset();
this.valuesReader = null;
this.vectorizedDefinitionLevelReader = null;
}
@Override
protected void initDataReader(Encoding dataEncoding, ByteBufferInputStream in, int valueCount) {
ValuesReader previousReader = (ValuesReader) valuesReader;
if (dataEncoding.usesDictionary()) {
if (dictionary == null) {
throw new ParquetDecodingException(
"could not read page in col "
+ desc
+ " as the dictionary was missing for encoding "
+ dataEncoding);
}
try {
dictionaryEncodedValuesReader =
new VectorizedDictionaryEncodedParquetValuesReader(
desc.getMaxDefinitionLevel(), setArrowValidityVector);
dictionaryEncodedValuesReader.initFromPage(valueCount, in);
if (ParquetUtil.isIntType(desc.getPrimitiveType()) || !allPagesDictEncoded) {
dictionaryDecodeMode = DictionaryDecodeMode.EAGER;
} else {
dictionaryDecodeMode = DictionaryDecodeMode.LAZY;
}
} catch (IOException e) {
throw new ParquetDecodingException("could not read page in col " + desc, e);
}View on GitHub (pinned to 86d9c8fc54)
Solutions
- Ensure the full column chunk including the dictionary page is read (don't skip pages when iterating).
- Validate and rewrite the corrupt Parquet file if its dictionary page is genuinely missing.
- Upgrade Iceberg if a known bug in dictionary page handling matches your version.
- Disable vectorized reads as a fallback to the standard Parquet reader.
Defensive patterns
Strategy: try-catch
Try / catch
try {
// vectorized read
} catch (ParquetDecodingException e) {
if (e.getMessage().contains("dictionary was missing")) {
// re-read the full column chunk including dictionary page, or fall back to non-vectorized reader
} else throw e;
} Prevention
- Always read complete column chunks; never skip dictionary pages
- Validate files for missing dictionary pages before commit
- Upgrade Iceberg if your version has known dictionary-page handling bugs
When it happens
Trigger: initDataReader receives a dataEncoding.usesDictionary()==true while the dictionary field is null for the column.
Common situations: Corrupted files missing dictionary pages, custom readers that skip dictionary pages, or row-group/page iteration that started mid-chunk after the dictionary page.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- could not read page in col %s as the dictionary was missing
- Unsupported base type for decimal:
- Unsupported logical type: " + primitive.getOriginalType()
- Unsupported type: " + primitive
- Non-supported bytesWidth: " + bytesWidth
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/1021ce4a091a25e8.
Report an issue: GitHub.