@Override
    public void close() throws IOException {
        try {
            closeCurrentWriter();
            for (Future future : futures) {
                future.get();
            }
            checkFailure();
            latestWriter = null;
            latestPartitionPath = null;
        } catch (InterruptedException | ExecutionException e) {
            LOG.warn("Interrupted while waiting for tasks to finish", e);
            throw new RuntimeException(e);
        }
    }
Create a PartitionKey from the values in row.
<p>
Any PartitionKey returned by this method can be reused by the implementation.

@param row a data row
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/GroupedPartitionedFanoutWriter.java