prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Partition key type %s not supported
What it means
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.
Source
Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiMetadata.java:240
private List<HudiColumnHandle> getDataColumnHandles(Table table)
{
return fromDataColumns(table.getDataColumns());
}
private List<HudiColumnHandle> getPartitionColumnHandles(Table table)
{
return fromPartitionColumns(table.getPartitionColumns());
}
static List<HudiColumnHandle> fromPartitionColumns(List<Column> partitionColumns)
{
ImmutableList.Builder<HudiColumnHandle> builder = ImmutableList.builderWithExpectedSize(partitionColumns.size());
int id = MAX_PARTITION_KEY_COLUMN_INDEX;
for (Column column : partitionColumns) {
HiveType hiveType = column.getType();
if (!hiveType.isSupportedType()) {
throw new PrestoException(NOT_SUPPORTED, String.format("Partition key type %s not supported", hiveType));
}
builder.add(fromPartitionColumn(id, column));
id--;
}
return builder.build();
}
static List<HudiColumnHandle> fromDataColumns(List<Column> dataColumns)
{
ImmutableList.Builder<HudiColumnHandle> builder = ImmutableList.builder();
int id = 0;
for (Column column : dataColumns) {
HiveType hiveType = column.getType();
if (hiveType.isSupportedType()) {
builder.add(fromDataColumn(id, column));
}
id++;
}View on GitHub (pinned to 55bb57d202)
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
Example fix
-- before CREATE TABLE hudi_events (...) PARTITIONED BY (details map<string,string>); -- after CREATE TABLE hudi_events (...) PARTITIONED BY (details_key varchar); -- partition on a supported scalar column
Defensive patterns
Strategy: validation
Validate before calling
HiveType hiveType = column.getType();
if (!hiveType.isSupportedType()) {
throw new IllegalArgumentException(
"Refusing to query: partition column " + column.getName() +
" has unsupported Hive type " + hiveType);
} Type guard
boolean isSupportedPartitionKey(Column col) {
return col.getType().isSupportedType();
} Try / catch
try {
metadata.getPartitionColumnHandles(table);
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.getCode()) {
// fall back to non-partitioned layout or fix DDL
} else {
throw e;
}
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.
Related errors
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/f1ed20745743f01c.
Report an issue: GitHub.