{"record":{"id":"905c14286dfeeea7","repo":"prestodb/presto","slug":"unsupported-bucket-function-type","errorCode":null,"errorMessage":"Unsupported bucket function type ","messagePattern":"Unsupported bucket function type ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java","lineNumber":1182,"sourceCode":"                    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(\n                            partitionColumns,\n                            partitioningHandle.getBucketCount(),\n                            ImmutableList.of(),\n                            PRESTO_NATIVE,\n                            Optional.of(partitionColumns.stream()\n                                    .map(columnNameToTypeMap::get)\n                                    .collect(toImmutableList())));\n                default:\n                    throw new IllegalArgumentException(\"Unsupported bucket function type \" + bucketFunctionType);\n            }\n        });\n\n        if (isUsePageFileForHiveUnsupportedType(session)) {\n            if (!columns.stream()\n                    .map(ColumnMetadata::getType)\n                    .allMatch(HiveTypeTranslator::isSupportedHiveType)) {\n                storageFormat = PAGEFILE;\n            }\n        }\n\n        // PAGEFILE format doesn't require translation to hive type,\n        // choose HIVE_BINARY as a default hive type to make it compatible with Hive connector\n        Optional<HiveType> defaultHiveType = storageFormat == PAGEFILE ? Optional.of(HIVE_BINARY) : Optional.empty();\n\n        List<HiveColumnHandle> columnHandles = getColumnHandles(\n                // Hive doesn't support anonymous rows and unknown type\n                // Since this method doesn't create a real table, it is fine","sourceCodeStart":1164,"sourceCodeEnd":1200,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java#L1164-L1200","documentation":"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.","triggerScenarios":"Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveMetadata.java:1182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported bucket function type for the temporary table","Upgrade to a version supporting the requested bucket function"],"exampleFix":null,"handlingStrategy":"type-guard","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-11T21:17:09.523Z"}