{"record":{"id":"787fb1afc6602532","repo":"prestodb/presto","slug":"invalid-table-property-787fb1","errorCode":"INVALID_TABLE_PROPERTY","errorMessage":"Bucketing columns %s not present in schema","messagePattern":"Bucketing columns (.+?) not present in schema","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java","lineNumber":1155,"sourceCode":"                tableProperties,\n                targetPath,\n                tableType,\n                prestoVersion,\n                metastoreContext);\n    }\n\n    @Override\n    public ConnectorTableHandle createTemporaryTable(ConnectorSession session, List<ColumnMetadata> columns, Optional<ConnectorPartitioningMetadata> partitioningMetadata)\n    {\n        String schemaName = getTemporaryTableSchema(session);\n        HiveStorageFormat storageFormat = getTemporaryTableStorageFormat(session);\n\n        Optional<HiveBucketProperty> bucketProperty = partitioningMetadata.map(partitioning -> {\n            Set<String> allColumns = columns.stream()\n                    .map(ColumnMetadata::getName)\n                    .collect(toImmutableSet());\n            if (!allColumns.containsAll(partitioning.getPartitionColumns())) {\n                throw new PrestoException(INVALID_TABLE_PROPERTY, format(\n                        \"Bucketing columns %s not present in schema\",\n                        Sets.difference(ImmutableSet.copyOf(partitioning.getPartitionColumns()), allColumns)));\n            }\n            HivePartitioningHandle partitioningHandle = (HivePartitioningHandle) partitioning.getPartitioningHandle();\n            List<String> partitionColumns = partitioning.getPartitionColumns();\n            BucketFunctionType bucketFunctionType = partitioningHandle.getBucketFunctionType();\n            switch (bucketFunctionType) {\n                case HIVE_COMPATIBLE:\n                    return new HiveBucketProperty(\n                            partitionColumns,\n                            partitioningHandle.getBucketCount(),\n                            ImmutableList.of(),\n                            HIVE_COMPATIBLE,\n                            Optional.empty());\n                case PRESTO_NATIVE:\n                    Map<String, Type> columnNameToTypeMap = columns.stream()\n                            .collect(toMap(ColumnMetadata::getName, ColumnMetadata::getType));\n                    return new HiveBucketProperty(","sourceCodeStart":1137,"sourceCodeEnd":1173,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java#L1137-L1173","documentation":"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.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1155 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix spelling of the bucketing column names","Include the bucketing columns in the table schema","Remove the bucket property if incorrect"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}