{"record":{"id":"39fb52be2ff70804","repo":"prestodb/presto","slug":"not-supported-39fb52","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported type [%s] for partition: %s","messagePattern":"Unsupported type \\[(.+?)\\] for partition: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveUtil.java","lineNumber":611,"sourceCode":"    {\n        try {\n            configuration = copy(configuration); // Some SerDes (e.g. Avro) modify passed configuration\n            ((AbstractSerDe) deserializer).initialize(configuration, schema, null);\n        }\n        catch (SerDeException | RuntimeException e) {\n            throw new RuntimeException(\"error initializing deserializer: \" + deserializer.getClass().getName(), e);\n        }\n    }\n\n    public static boolean isHiveNull(byte[] bytes)\n    {\n        return bytes.length == 2 && bytes[0] == '\\\\' && bytes[1] == 'N';\n    }\n\n    public static void verifyPartitionTypeSupported(String partitionName, Type type)\n    {\n        if (!isValidPartitionType(type)) {\n            throw new PrestoException(NOT_SUPPORTED, format(\"Unsupported type [%s] for partition: %s\", type, partitionName));\n        }\n    }\n\n    private static boolean isValidPartitionType(Type type)\n    {\n        return type instanceof DecimalType ||\n                BOOLEAN.equals(type) ||\n                TINYINT.equals(type) ||\n                SMALLINT.equals(type) ||\n                INTEGER.equals(type) ||\n                BIGINT.equals(type) ||\n                REAL.equals(type) ||\n                DOUBLE.equals(type) ||\n                DATE.equals(type) ||\n                TIMESTAMP.equals(type) ||\n                isVarcharType(type) ||\n                isCharType(type) ||\n                isEnumType(type) ||","sourceCodeStart":593,"sourceCodeEnd":629,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveUtil.java#L593-L629","documentation":"Partition (and bucket) column types must be ones the connector can convert from their string-encoded partition values — decimals, numeric/primitive types accepted by isValidPartitionType. verifyPartitionTypeSupported throws NOT_SUPPORTED when a partition key's type is outside that set, because parsePartitionValue cannot decode it.","triggerScenarios":"Querying or listing partitions of a table whose partition key type is exotic/custom (e.g. complex types, unsupported date/time variants) — checked during partition value parsing.","commonSituations":"Hive tables partitioned on types Presto's Hive connector doesn't map (legacy UNIONTYPE/struct partition keys, unusual custom object types); tables created by external tools with non-standard partition schemas.","solutions":["Recreate the table partitioned on a supported primitive type (string, bigint, int, date, varchar, decimal, etc.)","CAST the partition column to a supported type at the source and repartition the data","Skip reading those partitions / filter them out if only some partitions use unsupported keys"],"exampleFix":"-- before\nCREATE TABLE t (...) PARTITION BY LIST (p complex_type) ...\n-- after\nCREATE TABLE t (...) PARTITION BY LIST (p varchar) ... -- repartition with string-encoded key","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"boolean\",\"bigint\",\"integer\",\"smallint\",\"tinyint\",\"real\",\"double\",\"decimal\",\"varchar\",\"date\",\"timestamp\",\"interval year to month\",\"interval day to second\");\nif (!supported.contains(typeName.toLowerCase())) throw new IllegalArgumentException(\"unsupported partition type: \" + typeName);","typeGuard":"boolean isValidPartitionType(Type type) {\n    return type instanceof DecimalType || type instanceof BigintType || type instanceof IntegerType\n        || type instanceof SmallintType || type instanceof TinyintType || type instanceof DoubleType\n        || type instanceof RealType || type instanceof VarcharType || type instanceof DateType\n        || type instanceof TimestampType;\n}","tryCatchPattern":"try { listPartitions(table); } catch (PrestoException e) { if (e.getErrorCode().getName().equals(\"NOT_SUPPORTED\")) { /* repartition on a supported primitive or exclude table */ } else throw e; }","preventionTips":["Partition only on primitive Hive types (string/bigint/date/decimal etc.)","Review partition schemas when importing tables from external engines","Cast unsupported partition keys to varchar at ingestion time"],"tags":["hive","partition","not-supported","type-system"],"backgroundTag":"unsupported-partition-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"}