{"record":{"id":"4876f19483f5d500","repo":"prestodb/presto","slug":"unknown-converted-type","errorCode":null,"errorMessage":"Unknown converted type ","messagePattern":"Unknown converted type ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/cache/MetadataReader.java","lineNumber":547,"sourceCode":"                return OriginalType.INT_16;\n            case INT_32:\n                return OriginalType.INT_32;\n            case INT_64:\n                return OriginalType.INT_64;\n            case UINT_8:\n                return OriginalType.UINT_8;\n            case UINT_16:\n                return OriginalType.UINT_16;\n            case UINT_32:\n                return OriginalType.UINT_32;\n            case UINT_64:\n                return OriginalType.UINT_64;\n            case JSON:\n                return OriginalType.JSON;\n            case BSON:\n                return OriginalType.BSON;\n            default:\n                throw new IllegalArgumentException(\"Unknown converted type \" + type);\n        }\n    }\n\n    @Override\n    public ParquetFileMetadata getParquetMetadata(\n            ParquetDataSource parquetDataSource,\n            long fileSize,\n            boolean cacheable,\n            long modificationTime,\n            Optional<InternalFileDecryptor> fileDecryptor,\n            boolean readMaskedValue)\n            throws IOException\n    {\n        return readFooter(parquetDataSource, fileSize, modificationTime, fileDecryptor, readMaskedValue);\n    }\n\n    private static IndexReference toColumnIndexReference(ColumnChunk columnChunk)\n    {","sourceCodeStart":529,"sourceCodeEnd":565,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/cache/MetadataReader.java#L529-L565","documentation":"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.","triggerScenarios":"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).","commonSituations":"Files written by newer engines (Spark, Trino, arrow) using logical types unsupported by an older Presto reader; thrift corruption; hand-modified metadata.","solutions":["Upgrade Presto/presto-parquet to a build with a current ConvertedType/LogicalType mapping","Re-write the file without the unsupported logical annotation (plain physical type)","Use parquet-tools to dump the schema and identify the unsupported column","Validate the file for corruption if the type should be supported"],"exampleFix":"// before\n// default: throw new IllegalArgumentException(\"Unknown converted type \" + type);\n// after\ndefault:\n    LOG.warn(\"Unknown converted type %s; ignoring logical type\", type);\n    return null;","handlingStrategy":"validation","validationCode":"// check logical types against the reader's supported set\nList<ConvertedType> unsupported = readSchema(dataSource).stream()\n    .map(SchemaElement::getConverted_type)\n    .filter(t -> !SUPPORTED.contains(t))\n    .collect(toList());\nif (!unsupported.isEmpty()) throw new UnsupportedLogicalTypeException(unsupported);","typeGuard":"boolean isSupportedConvertedType(ConvertedType t) {\n    return t == null || KNOWN_CONVERTED_TYPES.contains(t.name());\n}","tryCatchPattern":"try {\n    readParquetMetadata(dataSource);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unknown converted type \")) {\n        // tolerate by ignoring the logical annotation\n        return readParquetMetadataIgnoringLogicalTypes(dataSource);\n    } else throw e;\n}","preventionTips":["Keep reader library versions current with parquet logical-type evolution","Strip unsupported logical annotations when exporting to older consumers","Dump schemas with parquet-tools before adding new sources"],"tags":["parquet","schema","logical-type","version-compatibility"],"backgroundTag":"unknown-parquet-converted-type","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}