presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/PartitionTransforms.java/PartitionTransforms/getColumnTransform
class PartitionTransforms:    public static ColumnTransform getColumnTransform(PartitionField field, Type type)
    {
        String transform = field.transform().toString();

        switch (transform) {
            case "identity":
                return new ColumnTransform(type, Function.identity());
            case "year":
                if (type.equals(DATE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::yearsFromDate);
                }
                if (type.equals(TIMESTAMP)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::yearsFromTimestamp);
                }
                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::yearsFromTimestampWithTimeZone);
                }
                throw new UnsupportedOperationException("Unsupported type for 'year': " + field);
            case "month":
                if (type.equals(DATE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::monthsFromDate);
                }
                if (type.equals(TIMESTAMP)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::monthsFromTimestamp);
                }
                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::monthsFromTimestampWithTimeZone);
                }
                throw new UnsupportedOperationException("Unsupported type for 'month': " + field);
            case "day":
                if (type.equals(DATE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::daysFromDate);
                }
                if (type.equals(TIMESTAMP)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::daysFromTimestamp);
                }
                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::daysFromTimestampWithTimeZone);
                }
                throw new UnsupportedOperationException("Unsupported type for 'day': " + field);
            case "hour":
                if (type.equals(TIMESTAMP)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::hoursFromTimestamp);
                }
                if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {
                    return new ColumnTransform(INTEGER, PartitionTransforms::hoursFromTimestampWithTimeZone);
                }
                throw new UnsupportedOperationException("Unsupported type for 'hour': " + field);
        }

        Matcher matcher = BUCKET_PATTERN.matcher(transform);
        if (matcher.matches()) {
            int count = parseInt(matcher.group(1));
            if (type.equals(INTEGER)) {
                return new ColumnTransform(INTEGER, block -> bucketInteger(block, count));
            }
            if (type.equals(BIGINT)) {
                return new ColumnTransform(INTEGER, block -> bucketBigint(block, count));
            }
            if (isShortDecimal(type)) {
                DecimalType decimal = (DecimalType) type;
                return new ColumnTransform(INTEGER, block -> bucketShortDecimal(decimal, block, count));
            }
            if (isLongDecimal(type)) {
                DecimalType decimal = (DecimalType) type;
                return new ColumnTransform(INTEGER, block -> bucketLongDecimal(decimal, block, count));
            }
            if (type.equals(DATE)) {
                return new ColumnTransform(INTEGER, block -> bucketDate(block, count));
            }
            if (type.equals(TIME)) {
                return new ColumnTransform(INTEGER, block -> bucketTime(block, count));
            }
            if (type.equals(TIMESTAMP)) {
                return new ColumnTransform(INTEGER, block -> bucketTimestamp(block, count));
            }
            if (type.equals(TIMESTAMP_WITH_TIME_ZONE)) {
                return new ColumnTransform(INTEGER, block -> bucketTimestampWithTimeZone(block, count));
            }
            if (isVarcharType(type)) {
                return new ColumnTransform(INTEGER, block -> bucketVarchar(block, count));
            }
            if (type.equals(VARBINARY)) {
                return new ColumnTransform(INTEGER, block -> bucketVarbinary(block, count));
            }
            if (type.getBaseName().equals(StandardTypes.UUID)) {
                return new ColumnTransform(INTEGER, block -> bucketUuid(block, count));
            }
            throw new UnsupportedOperationException("Unsupported type for 'bucket': " + field);
        }

        matcher = TRUNCATE_PATTERN.matcher(transform);
        if (matcher.matches()) {
            int width = parseInt(matcher.group(1));
            if (type.equals(INTEGER)) {
                return new ColumnTransform(INTEGER, block -> truncateInteger(block, width));
            }
            if (type.equals(BIGINT)) {
                return new ColumnTransform(BIGINT, block -> truncateBigint(block, width));
            }
            if (isShortDecimal(type)) {
                DecimalType decimal = (DecimalType) type;
                return new ColumnTransform(type, block -> truncateShortDecimal(decimal, block, width));
            }
            if (isLongDecimal(type)) {
                DecimalType decimal = (DecimalType) type;
                return new ColumnTransform(type, block -> truncateLongDecimal(decimal, block, width));
            }
            if (isVarcharType(type)) {
                return new ColumnTransform(VARCHAR, block -> truncateVarchar(block, width));
            }
            if (type.equals(VARBINARY)) {
                return new ColumnTransform(VARBINARY, block -> truncateVarbinary(block, width));
            }
            throw new UnsupportedOperationException("Unsupported type for 'truncate': " + field);
        }

        throw new UnsupportedOperationException("Unsupported partition transform: " + field);
    }