prestodb/presto · error · PrestoException
INVALID_TABLE_PROPERTY
INVALID_TABLE_PROPERTY
Error message
Bucketing columns %s not present in schema
What it means
createTemporaryTable validates the partitioning metadata: the bucketing column names supplied in the partitioning property do not exist among the temporary table's columns, so the bucket property cannot be built.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1155
tableProperties,
targetPath,
tableType,
prestoVersion,
metastoreContext);
}
@Override
public ConnectorTableHandle createTemporaryTable(ConnectorSession session, List<ColumnMetadata> columns, Optional<ConnectorPartitioningMetadata> partitioningMetadata)
{
String schemaName = getTemporaryTableSchema(session);
HiveStorageFormat storageFormat = getTemporaryTableStorageFormat(session);
Optional<HiveBucketProperty> bucketProperty = partitioningMetadata.map(partitioning -> {
Set<String> allColumns = columns.stream()
.map(ColumnMetadata::getName)
.collect(toImmutableSet());
if (!allColumns.containsAll(partitioning.getPartitionColumns())) {
throw new PrestoException(INVALID_TABLE_PROPERTY, format(
"Bucketing columns %s not present in schema",
Sets.difference(ImmutableSet.copyOf(partitioning.getPartitionColumns()), allColumns)));
}
HivePartitioningHandle partitioningHandle = (HivePartitioningHandle) partitioning.getPartitioningHandle();
List<String> partitionColumns = partitioning.getPartitionColumns();
BucketFunctionType bucketFunctionType = partitioningHandle.getBucketFunctionType();
switch (bucketFunctionType) {
case HIVE_COMPATIBLE:
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(View on GitHub (pinned to 55bb57d202)
Solutions
- Fix spelling of the bucketing column names
- Include the bucketing columns in the table schema
- Remove the bucket property if incorrect
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1155 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/787fb1afc6602532.
Report an issue: GitHub.