{"record":{"id":"f1ed20745743f01c","repo":"prestodb/presto","slug":"not-supported-f1ed20","errorCode":"NOT_SUPPORTED","errorMessage":"Partition key type %s not supported","messagePattern":"Partition key type (.+?) not supported","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hudi/src/main/java/com/facebook/presto/hudi/HudiMetadata.java","lineNumber":240,"sourceCode":"\n    private List<HudiColumnHandle> getDataColumnHandles(Table table)\n    {\n        return fromDataColumns(table.getDataColumns());\n    }\n\n    private List<HudiColumnHandle> getPartitionColumnHandles(Table table)\n    {\n        return fromPartitionColumns(table.getPartitionColumns());\n    }\n\n    static List<HudiColumnHandle> fromPartitionColumns(List<Column> partitionColumns)\n    {\n        ImmutableList.Builder<HudiColumnHandle> builder = ImmutableList.builderWithExpectedSize(partitionColumns.size());\n        int id = MAX_PARTITION_KEY_COLUMN_INDEX;\n        for (Column column : partitionColumns) {\n            HiveType hiveType = column.getType();\n            if (!hiveType.isSupportedType()) {\n                throw new PrestoException(NOT_SUPPORTED, String.format(\"Partition key type %s not supported\", hiveType));\n            }\n            builder.add(fromPartitionColumn(id, column));\n            id--;\n        }\n        return builder.build();\n    }\n\n    static List<HudiColumnHandle> fromDataColumns(List<Column> dataColumns)\n    {\n        ImmutableList.Builder<HudiColumnHandle> builder = ImmutableList.builder();\n        int id = 0;\n        for (Column column : dataColumns) {\n            HiveType hiveType = column.getType();\n            if (hiveType.isSupportedType()) {\n                builder.add(fromDataColumn(id, column));\n            }\n            id++;\n        }","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hudi/src/main/java/com/facebook/presto/hudi/HudiMetadata.java#L222-L258","documentation":"Presto refuses to plan queries over a Hudi table whose partition key column has a Hive type the connector cannot represent (hiveType.isSupportedType() returns false). The connector builds partition column handles in fromPartitionColumns and validates each partition column's Hive type before mapping it, throwing NOT_SUPPORTED at the metadata layer so the failure happens at planning time, not scan time.","triggerScenarios":"Running any query against a Hudi table where a partition column's Hive type is unsupported (e.g. complex/nested types such as map, array, struct, or exotic primitives) — triggered via getPartitionColumnHandles -> fromPartitionColumns during metadata resolution.","commonSituations":"Tables partitioned by non-scalar Hive columns, tables migrated from other engines with unusual partition column DDL, or tables where partition keys were declared with complex types by an upstream writer.","solutions":["ALTER the table so partition keys use supported scalar Hive types (string, int, bigint, date, etc.)","Change the Hudi writer pipeline to partition on a primitive column and keep complex data in regular data columns","If the partition column is genuinely unused, recreate the table with supported partitioning via a rewrite (CTAS)","Check the exact type from the error message and confirm it against the Hive connector's supported type list"],"exampleFix":"-- before\nCREATE TABLE hudi_events (...) PARTITIONED BY (details map<string,string>);\n-- after\nCREATE TABLE hudi_events (...) PARTITIONED BY (details_key varchar); -- partition on a supported scalar column","handlingStrategy":"validation","validationCode":"HiveType hiveType = column.getType();\nif (!hiveType.isSupportedType()) {\n    throw new IllegalArgumentException(\n        \"Refusing to query: partition column \" + column.getName() +\n        \" has unsupported Hive type \" + hiveType);\n}","typeGuard":"boolean isSupportedPartitionKey(Column col) {\n    return col.getType().isSupportedType();\n}","tryCatchPattern":"try {\n    metadata.getPartitionColumnHandles(table);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.getCode()) {\n        // fall back to non-partitioned layout or fix DDL\n    } else {\n        throw e;\n    }\n}","preventionTips":["Partition Hudi tables only on primitive Hive types","Validate partition column DDL at table creation time in your ingestion pipeline","Add a pre-deployment schema check that walks partition keys and calls isSupportedType"],"tags":["presto","hudi","not-supported","partitioning","schema"],"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-11T21:17:09.523Z"}