prestodb/presto · error · PrestoException
PARQUET_UNSUPPORTED_ENCODING
PARQUET_UNSUPPORTED_ENCODING
Error message
Column: %s, Encoding: %s
What it means
PrestoException (PARQUET_UNSUPPORTED_ENCODING) thrown at the end of Decoders.createValuesDecoder() when no branch matched the page's (type, encoding) combination at all — the encoding is not supported by the batch reader for this column. Unlike the type-specific errors, this signals an entirely unhandled encoding (or a supported encoding on a type outside its allowed branches).
Source
Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/decoders/Decoders.java:297
if (encoding == DELTA_BYTE_ARRAY && type == PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY) {
if (isDecimalType(columnDescriptor)) {
ByteBufferInputStream inputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(buffer, offset, length));
ValuesReader parquetReader = getParquetReader(encoding, columnDescriptor, valueCount, inputStream);
if (isShortDecimalType(columnDescriptor)) {
return new FixedLenByteArrayShortDecimalDeltaValueDecoder(parquetReader, columnDescriptor);
}
return new FixedLenByteArrayLongDecimalDeltaValueDecoder(parquetReader);
}
else if (isUuidType(columnDescriptor)) {
ByteBufferInputStream inputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(buffer, offset, length));
ValuesReader parquetReader = getParquetReader(encoding, columnDescriptor, valueCount, inputStream);
return new FixedLenByteArrayUuidDeltaValuesDecoder(parquetReader);
}
}
throw new PrestoException(PARQUET_UNSUPPORTED_ENCODING, format("Column: %s, Encoding: %s", columnDescriptor, encoding));
}
private static ValuesReader getParquetReader(ParquetEncoding encoding, ColumnDescriptor descriptor, int valueCount, ByteBufferInputStream inputStream)
throws IOException
{
ValuesReader valuesReader = encoding.getValuesReader(descriptor, VALUES);
valuesReader.initFromPage(valueCount, inputStream);
return valuesReader;
}
private static FlatDecoders readFlatPageV1(DataPageV1 page, RichColumnDescriptor columnDescriptor, Dictionary dictionary)
throws IOException
{
byte[] bytes = page.getSlice().getBytes();
ByteBuffer byteBuffer = ByteBuffer.wrap(bytes, 0, bytes.length);
FlatDefinitionLevelDecoder definitionLevelDecoder = createFlatDefinitionLevelDecoder(
page.getDefinitionLevelEncoding(),
columnDescriptor.isRequired(),View on GitHub (pinned to 55bb57d202)
Solutions
- Dump the file's encoding per column with parquet-tools to identify the unhandled encoding.
- Upgrade Presto to a version supporting that encoding.
- Rewrite the file with standard encodings (PLAIN/RLE/dictionary).
- Fall back to the legacy (non-batch) Parquet reader if available.
Example fix
// before // unknown encoding -> PARQUET_UNSUPPORTED_ENCODING // after // force supported encodings in writer config writer.withEncoding(PLAIN) // or PLAIN_DICTIONARY/RLE_DICTIONARY
Defensive patterns
Strategy: validation
Validate before calling
// enumerate encodings in the file footer and check support before reading
Set<Encoding> used = pages.stream().map(p -> p.getEncoding()).collect(toSet());
used.removeAll(SUPPORTED_ENCODINGS); // PLAIN, RLE, PLAIN_DICTIONARY, RLE_DICTIONARY, DELTA_*
if (!used.isEmpty()) throw new IllegalArgumentException("Unsupported encodings: " + used); Try / catch
try {
decoder = Decoders.readFlatPage(page, columnDescriptor, dictionary);
} catch (PrestoException e) {
if (e.getErrorCode().getName().equals("PARQUET_UNSUPPORTED_ENCODING")) {
// rewrite the file with standard encodings or upgrade Presto
}
throw e;
} Prevention
- Inspect file encodings with parquet-tools before ingestion
- Upgrade Presto when writers introduce new encodings
- Rewrite files with nonstandard encodings
- Pin writer/reader parquet library versions
When it happens
Trigger: createValuesDecoder() (via valuesDecoder, createValuesDecoderV1/V2 paths) receives a ParquetEncoding not covered by PLAIN, RLE-boolean, dictionary, DELTA_BINARY_PACKED, DELTA_BYTE_ARRAY/DELTA_LENGTH_BYTE_ARRAY, or the UUID delta branch — e.g., exotic encodings or new encodings from newer writers.
Common situations: Reading files produced with encodings introduced after your Presto version; writers using BYTE_STREAM_SPLIT or other niche encodings; encrypted/extended encodings.
Related errors
- HUDI_CANNOT_OPEN_SPLIT
- Unsupported encoding
- PARQUET_IO_READ_ERROR
- PARQUET_IO_READ_ERROR
- PARQUET_UNSUPPORTED_COLUMN_TYPE
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/aefff60301316818.
Report an issue: GitHub.