{"record":{"id":"9c5530d1a12c2b96","repo":"prestodb/presto","slug":"unsupported-type-for-day","errorCode":null,"errorMessage":"Unsupported type for 'day': ","messagePattern":"Unsupported type for 'day': ","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java","lineNumber":159,"sourceCode":"                if (type.equals(TIMESTAMP)) {\n                    LongUnaryOperator transformDay = value -> epochDay(value);\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP, block, transformDay),\n                            ValueTransform.from(TIMESTAMP, transformDay));\n                }\n                if (type.equals(TIMESTAMP_MICROSECONDS)) {\n                    LongUnaryOperator transformDay = value -> epochDay(Math.floorDiv(value, 1000));\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP_MICROSECONDS, block, transformDay),\n                            ValueTransform.from(TIMESTAMP_MICROSECONDS, transformDay));\n                }\n                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {\n                    LongUnaryOperator transformDay = value -> epochDay(unpackMillisUtc(value));\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP_WITH_TIME_ZONE, block, transformDay),\n                            ValueTransform.from(TIMESTAMP_WITH_TIME_ZONE, transformDay));\n                }\n                throw new UnsupportedOperationException(\"Unsupported type for 'day': \" + field);\n            case \"hour\":\n                if (type.equals(TIMESTAMP)) {\n                    LongUnaryOperator transformHour = value -> epochHour(value);\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP, block, transformHour),\n                            ValueTransform.from(TIMESTAMP, transformHour));\n                }\n                if (type.equals(TIMESTAMP_MICROSECONDS)) {\n                    LongUnaryOperator transformHour = value -> epochHour(Math.floorDiv(value, 1000));\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP_MICROSECONDS, block, transformHour),\n                            ValueTransform.from(TIMESTAMP_MICROSECONDS, transformHour));\n                }\n                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {\n                    LongUnaryOperator transformHour = value -> epochHour(unpackMillisUtc(value));\n                    return new ColumnTransform(transform, INTEGER,\n                            block -> transformBlock(TIMESTAMP_WITH_TIME_ZONE, block, transformHour),\n                            ValueTransform.from(TIMESTAMP_WITH_TIME_ZONE, transformHour));","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java#L141-L177","documentation":"PartitionTransforms.getColumnTransform implements the day transform only for DATE and TIMESTAMP types; an unsupported type reaching the day branch raises this NOT_SUPPORTED error for the mismatched partition field.","triggerScenarios":"Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/PartitionTransforms.java:159 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use day() only on DATE/TIMESTAMP partition columns","Fix the partition spec to match a transform supported by the column type"],"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"}