public static <T> PTransform<PCollection<T>, PCollection<T>> unionDistinct(
      PCollection<T> rightCollection) {
    checkNotNull(rightCollection, "rightCollection argument is null");
    return new SetImpl<>(rightCollection, unionDistinct());
  }
@Test
  @Category(NeedsRunner.class)
  public void testUnionCollectionList() {
    PCollection<String> third = p.apply("third", Create.of(Arrays.asList("a", "k", "k")));
    PCollection<Row> thirdRows = p.apply("thirdRows", Create.of(toRows("a", "k", "k")));

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

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

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

    assertEquals(schema, results.getSchema());

    p.run();
  }