presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/organization/ShardOrganizerUtil.java/ShardOrganizerUtil/createOrganizationSet
class ShardOrganizerUtil:    static OrganizationSet createOrganizationSet(long tableId, Set<ShardIndexInfo> shardsToCompact)
    {
        Set<UUID> uuids = shardsToCompact.stream()
                .map(ShardIndexInfo::getShardUuid)
                .collect(toSet());

        Set<OptionalInt> bucketNumber = shardsToCompact.stream()
                .map(ShardIndexInfo::getBucketNumber)
                .collect(toSet());

        checkArgument(bucketNumber.size() == 1);
        return new OrganizationSet(tableId, uuids, getOnlyElement(bucketNumber));
    }