{"record":{"id":"b5a0d8e6103c98cf","repo":"prestodb/presto","slug":"unsupported-type-for-bucket","errorCode":null,"errorMessage":"Unsupported type for 'bucket': ","messagePattern":"Unsupported type for 'bucket': ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java","lineNumber":227,"sourceCode":"                        block -> bucketDate(block, count),\n                        (block, position) -> bucketValueDate(block, position, count));\n            }\n            if (type.equals(TIME)) {\n                return new ColumnTransform(transform, INTEGER,\n                        block -> bucketTime(block, count),\n                        (block, position) -> bucketValueTime(block, position, count));\n            }\n            if (type instanceof VarcharType) {\n                return new ColumnTransform(transform, INTEGER,\n                        block -> bucketVarchar(block, count),\n                        (block, position) -> bucketValueVarchar(block, position, count));\n            }\n            if (type.equals(VARBINARY)) {\n                return new ColumnTransform(transform, INTEGER,\n                        block -> bucketVarbinary(block, count),\n                        (block, position) -> bucketValueVarbinary(block, position, count));\n            }\n            throw new UnsupportedOperationException(\"Unsupported type for 'bucket': \" + field);\n        }\n\n        matcher = TRUNCATE_PATTERN.matcher(transform);\n        if (matcher.matches()) {\n            int width = parseInt(matcher.group(1));\n            if (type.equals(INTEGER)) {\n                return new ColumnTransform(transform, INTEGER,\n                        block -> truncateInteger(block, width),\n                        (block, position) -> {\n                            if (block.isNull(position)) {\n                                return null;\n                            }\n                            return truncateInteger(block, position, width);\n                        });\n            }\n            if (type.equals(BIGINT)) {\n                return new ColumnTransform(transform, BIGINT,\n                        block -> truncateBigint(block, width),","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java#L209-L245","documentation":"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.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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)"],"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-11T21:17:09.523Z"}