prestodb/presto · error · IllegalArgumentException
Unsupported bucket function type
Error message
Unsupported bucket function type
What it means
Bucket-function dispatch when creating a temporary table: the partitioning handle's bucket function kind is not one of the supported types (HIVE_COMPATIBLE / PRESTO_NATIVE), so a HiveBucketProperty cannot be built.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1182
return new HiveBucketProperty(
partitionColumns,
partitioningHandle.getBucketCount(),
ImmutableList.of(),
HIVE_COMPATIBLE,
Optional.empty());
case PRESTO_NATIVE:
Map<String, Type> columnNameToTypeMap = columns.stream()
.collect(toMap(ColumnMetadata::getName, ColumnMetadata::getType));
return new HiveBucketProperty(
partitionColumns,
partitioningHandle.getBucketCount(),
ImmutableList.of(),
PRESTO_NATIVE,
Optional.of(partitionColumns.stream()
.map(columnNameToTypeMap::get)
.collect(toImmutableList())));
default:
throw new IllegalArgumentException("Unsupported bucket function type " + bucketFunctionType);
}
});
if (isUsePageFileForHiveUnsupportedType(session)) {
if (!columns.stream()
.map(ColumnMetadata::getType)
.allMatch(HiveTypeTranslator::isSupportedHiveType)) {
storageFormat = PAGEFILE;
}
}
// PAGEFILE format doesn't require translation to hive type,
// choose HIVE_BINARY as a default hive type to make it compatible with Hive connector
Optional<HiveType> defaultHiveType = storageFormat == PAGEFILE ? Optional.of(HIVE_BINARY) : Optional.empty();
List<HiveColumnHandle> columnHandles = getColumnHandles(
// Hive doesn't support anonymous rows and unknown type
// Since this method doesn't create a real table, it is fineView on GitHub (pinned to 55bb57d202)
Solutions
- Use a supported bucket function type for the temporary table
- Upgrade to a version supporting the requested bucket function
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1182 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/905c14286dfeeea7.
Report an issue: GitHub.