presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergSplitSource.java/IcebergSplitSource/getPartitionKeys
class IcebergSplitSource:    private static Map<Integer, String> getPartitionKeys(FileScanTask scanTask)
    {
        StructLike partition = scanTask.file().partition();
        PartitionSpec spec = scanTask.spec();
        Map<PartitionField, Integer> fieldToIndex = getIdentityPartitions(spec);
        ImmutableMap.Builder<Integer, String> partitionKeys = ImmutableMap.builder();

        fieldToIndex.forEach((field, index) -> {
            int id = field.sourceId();
            Type type = spec.schema().findType(id);
            Class<?> javaClass = type.typeId().javaClass();
            Object value = partition.get(index, javaClass);

            if (value == null) {
                throw new PrestoException(ICEBERG_INVALID_PARTITION_VALUE, format(
                        "File %s has no partition data for partitioning column %s",
                        scanTask.file().path().toString(),
                        field.name()));
            }

            String partitionValue;
            if (type.typeId() == FIXED || type.typeId() == BINARY) {
                // this is safe because Iceberg PartitionData directly wraps the byte array
                partitionValue = new String(((ByteBuffer) value).array(), UTF_8);
            }
            else {
                partitionValue = value.toString();
            }
            partitionKeys.put(id, partitionValue);
        });

        return partitionKeys.build();
    }