{"record":{"id":"de3797845c4d3c96","repo":"prestodb/presto","slug":"not-supported-de3797","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported primitive type: %s","messagePattern":"Unsupported primitive type: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-parquet/src/main/java/com/facebook/presto/parquet/writer/ParquetSchemaConverter.java","lineNumber":156,"sourceCode":"            return parquetTypeBuilder.named(name);\n        }\n        if (DOUBLE.equals(type)) {\n            return Types.primitive(PrimitiveType.PrimitiveTypeName.DOUBLE, repetition).named(name);\n        }\n        if (RealType.REAL.equals(type)) {\n            return Types.primitive(PrimitiveType.PrimitiveTypeName.FLOAT, repetition).named(name);\n        }\n        if (type instanceof VarcharType || type instanceof CharType || type instanceof VarbinaryType) {\n            return Types.primitive(PrimitiveType.PrimitiveTypeName.BINARY, repetition).named(name);\n        }\n        if (type instanceof UuidType) {\n            LogicalTypeAnnotation logicalTypeAnnotation = LogicalTypeAnnotation.uuidType();\n            Types.PrimitiveBuilder<PrimitiveType> builder = Types.primitive(PrimitiveType.PrimitiveTypeName.FIXED_LEN_BYTE_ARRAY, repetition)\n                    .length(16);\n            builder = builder.as(logicalTypeAnnotation);\n            return builder.named(name);\n        }\n        throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported primitive type: %s\", type));\n    }\n\n    private org.apache.parquet.schema.Type getArrayType(ArrayType type, String name, List<String> parent, Repetition repetition)\n    {\n        Type elementType = type.getElementType();\n        return Types.list(repetition)\n                .element(convert(elementType, \"array\", ImmutableList.<String>builder().addAll(parent).add(name).add(\"list\").build(), OPTIONAL))\n                .named(name);\n    }\n\n    private org.apache.parquet.schema.Type getMapType(MapType type, String name, List<String> parent, Repetition repetition)\n    {\n        parent = ImmutableList.<String>builder().addAll(parent).add(name).add(\"key_value\").build();\n        Type keyType = type.getKeyType();\n        Type valueType = type.getValueType();\n        return Types.map(repetition)\n                .key(convert(keyType, \"key\", parent, REQUIRED))\n                .value(convert(valueType, \"value\", parent, OPTIONAL))","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-parquet/src/main/java/com/facebook/presto/parquet/writer/ParquetSchemaConverter.java#L138-L174","documentation":"Type-mapping guard in getPrimitiveType: the connector table declares a primitive type that has no Parquet primitive equivalent after all known cases (double, real, varchar/char/varbinary, ...) are exhausted. The table schema cannot be serialized to Parquet.","triggerScenarios":"Thrown at presto-parquet/src/main/java/com/facebook/presto/parquet/writer/ParquetSchemaConverter.java:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the column type to a Parquet-representable one before writing","Add a mapping for the type in ParquetSchemaConverter (code change)","Avoid CTAS/write into Parquet on tables containing that type"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}