public static <T> PTransform<PCollection<T>, PCollection<T>> unionAll(
      PCollection<T> rightCollection) {
    checkNotNull(rightCollection, "rightCollection argument is null");
    return new SetImpl<>(rightCollection, unionAll());
  }
@Test
  @Category(NeedsRunner.class)
  public void testUnionAllCollections() {

    PCollection<String> third = p.apply("third", Create.of(Arrays.asList("a", "b", "b", "k", "k")));
    PCollection<Row> thirdRows = p.apply("thirdRows", Create.of(toRows("a", "b", "b", "k", "k")));

    PAssert.that(
            PCollectionList.of(first).and(second).and(third).apply("stringsCols", Sets.unionAll()))
        .containsInAnyOrder(
            "a", "a", "a", "a", "a", "a", "b", "b", "b", "b", "b", "b", "b", "c", "c", "d", "d",
            "d", "d", "e", "e", "f", "f", "g", "g", "h", "h", "k", "k");

    PCollection<Row> results =
        PCollectionList.of(firstRows)
            .and(secondRows)
            .and(thirdRows)
            .apply("rowCols", Sets.unionAll());

    PAssert.that(results)
        .containsInAnyOrder(
            toRows(
                "a", "a", "a", "a", "a", "a", "b", "b", "b", "b", "b", "b", "b", "c", "c", "d", "d",
                "d", "d", "e", "e", "f", "f", "g", "g", "h", "h", "k", "k"));

    assertEquals(schema, results.getSchema());

    p.run();
  }