prestodb/presto · error · UnsupportedOperationException
Unsupported type for 'bucket':
Error message
Unsupported type for 'bucket':
What it means
PartitionTransforms.getColumnTransform implements the bucket transform only for supported key types (integers, long, date/time types, varchar, etc.); a type outside the supported set reaching the bucket branch raises this NOT_SUPPORTED error naming the offending type.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java:227
block -> bucketDate(block, count),
(block, position) -> bucketValueDate(block, position, count));
}
if (type.equals(TIME)) {
return new ColumnTransform(transform, INTEGER,
block -> bucketTime(block, count),
(block, position) -> bucketValueTime(block, position, count));
}
if (type instanceof VarcharType) {
return new ColumnTransform(transform, INTEGER,
block -> bucketVarchar(block, count),
(block, position) -> bucketValueVarchar(block, position, count));
}
if (type.equals(VARBINARY)) {
return new ColumnTransform(transform, INTEGER,
block -> bucketVarbinary(block, count),
(block, position) -> bucketValueVarbinary(block, position, count));
}
throw new UnsupportedOperationException("Unsupported type for 'bucket': " + field);
}
matcher = TRUNCATE_PATTERN.matcher(transform);
if (matcher.matches()) {
int width = parseInt(matcher.group(1));
if (type.equals(INTEGER)) {
return new ColumnTransform(transform, INTEGER,
block -> truncateInteger(block, width),
(block, position) -> {
if (block.isNull(position)) {
return null;
}
return truncateInteger(block, position, width);
});
}
if (type.equals(BIGINT)) {
return new ColumnTransform(transform, BIGINT,
block -> truncateBigint(block, width),View on GitHub (pinned to 55bb57d202)
Solutions
- Apply bucket(n, col) only to supported column types
- Change the partition column type or use a different transform for unsupported types (e.g. varbinary, complex types)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java:227 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/b5a0d8e6103c98cf.
Report an issue: GitHub.