Skip to content

SCollection#unionAll throws an exception on empty list #1092

@psobot

Description

@psobot

When passed an empty Iterable[SCollection[T]], SCollection#unionAll throws an exception:

Exception in thread "main" java.lang.IllegalArgumentException: must either have a non-empty list of PCollections, or must first call empty(Pipeline)
	at org.apache.beam.sdk.values.PCollectionList.of(PCollectionList.java:97)
	at com.spotify.scio.values.SCollection$.unionAll(SCollection.scala:71)

Scio should probably handle this case properly before calling into PCollectionList, as the union of an empty list of collections is logically an empty collection.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions