prestodb/presto · error · IllegalArgumentException

Unknown converted type

Error message

Unknown converted type 

What it means

getOriginalType maps thrift ConvertedType enum values to parquet-mr OriginalType logical types; an unmapped value hits the default branch and throws IllegalArgumentException. The file declares a logical/converted type this reader's mapping table doesn't cover — typically a logical type introduced after this reader was built.

Source

Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/cache/MetadataReader.java:547

                return OriginalType.INT_16;
            case INT_32:
                return OriginalType.INT_32;
            case INT_64:
                return OriginalType.INT_64;
            case UINT_8:
                return OriginalType.UINT_8;
            case UINT_16:
                return OriginalType.UINT_16;
            case UINT_32:
                return OriginalType.UINT_32;
            case UINT_64:
                return OriginalType.UINT_64;
            case JSON:
                return OriginalType.JSON;
            case BSON:
                return OriginalType.BSON;
            default:
                throw new IllegalArgumentException("Unknown converted type " + type);
        }
    }

    @Override
    public ParquetFileMetadata getParquetMetadata(
            ParquetDataSource parquetDataSource,
            long fileSize,
            boolean cacheable,
            long modificationTime,
            Optional<InternalFileDecryptor> fileDecryptor,
            boolean readMaskedValue)
            throws IOException
    {
        return readFooter(parquetDataSource, fileSize, modificationTime, fileDecryptor, readMaskedValue);
    }

    private static IndexReference toColumnIndexReference(ColumnChunk columnChunk)
    {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Upgrade Presto/presto-parquet to a build with a current ConvertedType/LogicalType mapping
  2. Re-write the file without the unsupported logical annotation (plain physical type)
  3. Use parquet-tools to dump the schema and identify the unsupported column
  4. Validate the file for corruption if the type should be supported

Example fix

// before
// default: throw new IllegalArgumentException("Unknown converted type " + type);
// after
default:
    LOG.warn("Unknown converted type %s; ignoring logical type", type);
    return null;
Defensive patterns

Strategy: validation

Validate before calling

// check logical types against the reader's supported set
List<ConvertedType> unsupported = readSchema(dataSource).stream()
    .map(SchemaElement::getConverted_type)
    .filter(t -> !SUPPORTED.contains(t))
    .collect(toList());
if (!unsupported.isEmpty()) throw new UnsupportedLogicalTypeException(unsupported);

Type guard

boolean isSupportedConvertedType(ConvertedType t) {
    return t == null || KNOWN_CONVERTED_TYPES.contains(t.name());
}

Try / catch

try {
    readParquetMetadata(dataSource);
} catch (IllegalArgumentException e) {
    if (e.getMessage().startsWith("Unknown converted type ")) {
        // tolerate by ignoring the logical annotation
        return readParquetMetadataIgnoringLogicalTypes(dataSource);
    } else throw e;
}

Prevention

When it happens

Trigger: readTypeSchema calls getOriginalType on a schema element whose ConvertedType enum constant is absent from the switch (e.g. newer logical annotations like VARIANT/UNKNOWN or corrupted enum bytes).

Common situations: Files written by newer engines (Spark, Trino, arrow) using logical types unsupported by an older Presto reader; thrift corruption; hand-modified metadata.

Related errors


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