code: private BucketShards computeMerged()
              throws SQLException
      {
          if (resultSet.isAfterLast()) {
              return endOfData();
          }
          if (first) {
              first = false;
              if (!resultSet.next()) {
                  return endOfData();
              }
          }
  
          int bucketNumber = resultSet.getInt("bucket_number");
          ImmutableSet.Builder<ShardNodes> shards = ImmutableSet.builder();
  
          do {
              UUID shardUuid = uuidFromBytes(resultSet.getBytes("shard_uuid"));
              int bucket = resultSet.getInt("bucket_number");
              Set<String> nodeIdentifiers = ImmutableSet.of(getBucketNode(bucket));
  
              shards.add(new ShardNodes(shardUuid, nodeIdentifiers));
          }
          while (resultSet.next() && resultSet.getInt("bucket_number") == bucketNumber);
  
          return new BucketShards(OptionalInt.of(bucketNumber), shards.build());
      }
docs: Compute split-per-bucket (single split for all shards in a bucket).