prestodb/presto · error · PrestoException
NOT_SUPPORTED
NOT_SUPPORTED
Error message
Invalid partition type
What it means
deserializePartitionValue only supports primitive partition column types; if the declared type falls through all supported branches (non-primitive, e.g. map/array/struct or a null-typed column), the connector throws NOT_SUPPORTED with 'Invalid partition type'. Hudi tables are not expected to be partitioned by non-primitive columns.
Source
Thrown at presto-hudi/src/main/java/com/facebook/presto/hudi/HudiPageSource.java:252
DecimalType decimalType = (DecimalType) type;
BigDecimal decimal = new BigDecimal(valueString);
decimal = decimal.setScale(decimalType.getScale(), BigDecimal.ROUND_UNNECESSARY);
if (decimal.precision() > decimalType.getPrecision()) {
throw new IllegalArgumentException();
}
BigInteger unscaledValue = decimal.unscaledValue();
return isShortDecimal(type) ? unscaledValue.longValue() : Decimals.encodeUnscaledValue(unscaledValue);
}
}
catch (IllegalArgumentException e) {
throw new PrestoException(HUDI_INVALID_PARTITION_VALUE, format(
"Invalid partition value '%s' for %s partition key: %s",
valueString,
type.getDisplayName(),
name));
}
// Hudi tables don't partition by non-primitive-type columns.
throw new PrestoException(NOT_SUPPORTED, "Invalid partition type " + type);
}
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Recreate/repartition the table using only primitive partition columns (string, int, bigint, date, etc.)
- Verify the column's type in the metastore; correct it if the metastore type is wrong
- Upgrade the connector if planning should have rejected this table earlier — it indicates a metadata/type-mapping gap
- Exclude the complex partition column from queries or materialize it as a primitive column
Example fix
-- before PARTITIONED BY (tags array<string>) -- after PARTITIONED BY (primary_tag string)
Defensive patterns
Strategy: validation
Validate before calling
// Ensure every partition column is a supported primitive before creating/altering the table
List<String> PRIMITIVES = List.of("varchar","integer","bigint","smallint","tinyint","boolean","date","timestamp","decimal","real","double");
partitionColumns.forEach(c -> {
if (!PRIMITIVES.contains(c.getType().toLowerCase())) {
throw new IllegalStateException("Partition column " + c.getName() +
" must be primitive, got " + c.getType());
}
}); Try / catch
try {
return pageSource.getNextPage();
} catch (PrestoException e) {
if (e.getErrorCode().getCode() == StandardErrorCode.NOT_SUPPORTED.getCode()
&& String.valueOf(e.getMessage()).startsWith("Invalid partition type")) {
throw new IllegalStateException("Repartition table on primitive keys", e);
}
throw e;
} Prevention
- Never partition Hudi tables on map/array/struct columns
- Enforce partition-key DDL linting in your table-creation tooling
- If a complex key is needed, add a derived primitive column for partitioning
When it happens
Trigger: Querying a Hudi table whose partition column handle has a non-primitive (complex or unrecognized) Presto type, reached while computing a prefilled constant value for a partition column in the page source.
Common situations: Tables partitioned on complex columns, metadata/type-mapping mismatches where the partition column resolved to a complex type, or connector bugs in type mapping that let an unsupported partition type through planning.
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/855c1102bf49ba8a.
Report an issue: GitHub.