code: public List<Query> shard(List<KeyOffset> sampledRowKeys) {
      Preconditions.checkState(builder.getRowsLimit() == 0, "Can't shard query with row limits");
  
      ImmutableSortedSet.Builder<ByteString> splitPoints =
          ImmutableSortedSet.orderedBy(ByteStringComparator.INSTANCE);
  
      for (KeyOffset keyOffset : sampledRowKeys) {
        if (!keyOffset.getKey().isEmpty()) {
          splitPoints.add(keyOffset.getKey());
        }
      }
  
      return shard(splitPoints.build());
    }
docs: Split this query into multiple queries that can be evenly distributed across Bigtable nodes and
  be run in parallel. This method takes the results from {@link
  com.google.cloud.bigtable.data.v2.BigtableDataClient#sampleRowKeysAsync(String)} to divide this
  query into a set of disjoint queries that logically combine into form this query.
  
  <p>Expected Usage:
  
  <pre>{@code
  List<KeyOffset> keyOffsets = dataClient.sampleRowKeysAsync("my-table").get();
  List<Query> queryShards = myQuery.shard(keyOffsets);
  List<ApiFuture<List<Row>>> futures = new ArrayList();
  for (Query subQuery : queryShards) {
  futures.add(dataClient.readRowsCallable().all().futureCall(subQuery));
  }
  List<List<Row>> results = ApiFutures.allAsList(futures).get();
  }</pre>