{"record":{"id":"3099bd1944e2bf1f","repo":"prestodb/presto","slug":"not-supported-3099bd","errorCode":"NOT_SUPPORTED","errorMessage":"unsupported type: ${type}","messagePattern":"unsupported type: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-rcfile/src/main/java/com/facebook/presto/rcfile/RcFileEncoding.java","lineNumber":127,"sourceCode":"        }\n        String baseType = type.getTypeSignature().getBase();\n        if (ARRAY.equals(baseType)) {\n            ColumnEncoding elementType = getEncoding(type.getTypeParameters().get(0));\n            return listEncoding(type, elementType);\n        }\n        if (MAP.equals(baseType)) {\n            ColumnEncoding keyType = getEncoding(type.getTypeParameters().get(0));\n            ColumnEncoding valueType = getEncoding(type.getTypeParameters().get(1));\n            return mapEncoding(type, keyType, valueType);\n        }\n        if (ROW.equals(baseType)) {\n            return structEncoding(\n                    type,\n                    type.getTypeParameters().stream()\n                            .map(this::getEncoding)\n                            .collect(toList()));\n        }\n        throw new PrestoException(NOT_SUPPORTED, \"unsupported type: \" + type);\n    }\n}\n","sourceCodeStart":109,"sourceCodeEnd":130,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-rcfile/src/main/java/com/facebook/presto/rcfile/RcFileEncoding.java#L109-L130","documentation":"RcFileEncoding.getEncoding maps a Presto/Hive type to its RCFile column encoder. If the type has no registered encoder (the switch over type signatures falls through), the library throws PrestoException(NOT_SUPPORTED) because RCFile RCBinary/Text encoding simply has no implementation for that type.","triggerScenarios":"Calling getEncoding (directly or via columnEncoding/elementType/keyType/valueType) with a type outside the supported set — e.g. exotic types like INTERVAL, UNKNOWN, custom parametric types, or nested types whose component types are unsupported (a MAP with an unsupported key type recurses into keyType and throws here).","commonSituations":"Tables created with Hive types Presto's RCFile reader doesn't implement; a schema change adding a new column type to an existing RCFile table; deeply nested types (array<map<...>>) where an inner type is unsupported.","solutions":["Identify the unsupported type from the message and change the table column to a supported type (e.g. convert INTERVAL or custom types to VARCHAR/BIGINT)","Rewrite the table in ORC or Parquet format, which supports far more types","If the type should be supported, upgrade Presto to a newer version where RCFile type coverage was extended","Catch PrestoException with code NOT_SUPPORTED and fall back to a different connector/format"],"exampleFix":"// before\nCREATE TABLE t (i interval day to second) WITH (format = 'RCFILE');\n// after\nCREATE TABLE t (i varchar) WITH (format = 'RCFILE'); -- or use ORC","handlingStrategy":"validation","validationCode":"Set<Signature> supported = ...; // from RcFileEncoding switch\nif (!isSupportedRcFileType(columnType)) {\n    throw new IllegalArgumentException(\"Column type not supported by RCFile: \" + columnType);\n}\ntry {\n    encodingFactory.getEncoding(columnType);\n} catch (PrestoException e) {\n    if (e.getErrorCode() == StandardErrorCode.NOT_SUPPORTED.toErrorCode().getCode()) {\n        // fall back to ORC or reject table\n    }\n}","typeGuard":"boolean isSupportedRcFileType(Type type) {\n    return type instanceof BigintType || type instanceof IntegerType || type instanceof SmallintType\n        || type instanceof TinyintType || type instanceof DoubleType || type instanceof RealType\n        || type instanceof BooleanType || type instanceof VarcharType || type instanceof VarbinaryType\n        || type instanceof DateType || type instanceof TimestampType;\n}","tryCatchPattern":"try { enc = getEncoding(type); } catch (PrestoException e) { if (NOT_SUPPORTED == e.getErrorCode().getName()) { enc = fallbackEncodingFor(type); } else { throw e; } }","preventionTips":["Check the RCFile type support list before creating RCFile tables","Prefer ORC/Parquet for exotic or deeply nested types","Add a schema lint step that validates all column types against supported encodings","Upgrade Presto before assuming a type is unsupported"],"tags":["rcfile","not-supported","type-system"],"backgroundTag":"unsupported-column-type","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"}