prestodb/presto · error · PrestoException

PARQUET_UNSUPPORTED_COLUMN_TYPE

PARQUET_UNSUPPORTED_COLUMN_TYPE

Error message

Column: %s, Encoding: %s

What it means

PrestoException (PARQUET_UNSUPPORTED_COLUMN_TYPE) thrown by Decoders.createValuesDecoder() when a PLAIN-encoded column's primitive type falls into the switch's default case — i.e., the (type, encoding) combination has no decoder implementation. The message names the column descriptor and encoding.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/batchreader/decoders/Decoders.java:170

                        }
                        return new BinaryLongDecimalPlainValuesDecoder(buffer, offset, length);
                    }
                    return new BinaryPlainValuesDecoder(buffer, offset, length);
                case FIXED_LEN_BYTE_ARRAY:
                    if (isDecimalType(columnDescriptor)) {
                        if (isShortDecimalType(columnDescriptor)) {
                            return new FixedLenByteArrayShortDecimalPlainValuesDecoder(columnDescriptor, buffer, offset, length);
                        }

                        int typeLength = columnDescriptor.getPrimitiveType().getTypeLength();
                        return new FixedLenByteArrayLongDecimalPlainValuesDecoder(typeLength, buffer, offset, length);
                    }
                    else if (isUuidType(columnDescriptor)) {
                        int typeLength = columnDescriptor.getPrimitiveType().getTypeLength();
                        return new FixedLenByteArrayUuidPlainValuesDecoder(typeLength, buffer, offset, length);
                    }
                default:
                    throw new PrestoException(PARQUET_UNSUPPORTED_COLUMN_TYPE, format("Column: %s, Encoding: %s", columnDescriptor, encoding));
            }
        }

        if (encoding == RLE && type == BOOLEAN) {
            ByteBuffer byteBuffer = ByteBuffer.wrap(buffer, offset, length);
            byteBuffer.getInt(); // skip past the length
            return new BooleanRLEValuesDecoder(byteBuffer);
        }

        if (encoding == RLE_DICTIONARY || encoding == PLAIN_DICTIONARY) {
            InputStream inputStream = ByteBufferInputStream.wrap(ByteBuffer.wrap(buffer, offset, length));
            int bitWidth = readIntLittleEndianOnOneByte(inputStream);
            switch (type) {
                case INT32:
                case FLOAT: {
                    if (isShortDecimalType(columnDescriptor)) {
                        return new Int32ShortDecimalRLEDictionaryValuesDecoder(bitWidth, inputStream, (IntegerDictionary) dictionary);
                    }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Identify the physical type via parquet-tools dump and check it's supported by your Presto version.
  2. Upgrade Presto to a version with a decoder for that type/encoding combo.
  3. Re-write the data with a supported type (e.g., map fixed_len_byte_array to UUID/DECIMAL or BINARY).
  4. Use the legacy (non-batch) reader if available via session/catalog config.
  5. File/patch a decoder case in Decoders.createValuesDecoder().

Example fix

// before
// PLAIN FIXED_LEN_BYTE_ARRAY with unknown semantic type -> default case throws
// after
// at write time, use a supported type
columnSchema.put("blob", FIXED_LEN_BYTE_ARRAY) // -> instead: Types.BINARY or DECIMAL/UUID
Defensive patterns

Strategy: validation

Validate before calling

// inspect physical type before scanning
PrimitiveTypeName t = columnDescriptor.getPrimitive().getPrimitiveTypeName();
if (t == PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY && !isDecimal && !isUuid)
    throw new IllegalArgumentException("Unsupported PLAIN FIXED_LEN_BYTE_ARRAY column: " + columnDescriptor);

Type guard

boolean isSupportedPlainType(ColumnDescriptor d) {
    switch (d.getPrimitiveType().getPrimitiveTypeName()) {
        case INT32: case INT64: case FLOAT: case DOUBLE: case BINARY: return true;
        case FIXED_LEN_BYTE_ARRAY: return isDecimalType(d) || isUuidType(d);
        default: return false;
    }
}

Try / catch

try {
    decoder = Decoders.readFlatPage(page, columnDescriptor, dictionary);
} catch (PrestoException e) {
    if (e.getErrorCode().getName().equals("PARQUET_UNSUPPORTED_COLUMN_TYPE")) {
        // upgrade reader or rewrite data with supported type
    }
    throw e;
}

Prevention

When it happens

Trigger: createValuesDecoder() is called for a PLAIN-encoded page whose primitive type is not one of the handled types (INT32/INT64/FLOAT/DOUBLE/BINARY/FIXED_LEN_BYTE_ARRAY decimal/uuid/int96-adjacent cases), e.g., PLAIN FIXED_LEN_BYTE_ARRAY that is neither decimal nor UUID, or an unhandled type like a novel physical type.

Common situations: Reading Parquet files written by newer or non-conforming writers using type/encoding combos Presto's batch reader doesn't support; fixed_len_byte_array columns that aren't decimal or UUID; older Presto versions lacking decoders for a type.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/5cd5b6fc3d36d4a3. Report an issue: GitHub.