Aggregate the elements using given combine functions and a neutral "zero value".
Aggregate the elements using given combine functions and a neutral "zero value". This function can return a different result type, U, than the type of this SCollection, T. Thus, we need one operation for merging a T into an U and one operation for merging two U's. Both of these functions are allowed to modify and return their first argument instead of creating a new U to avoid memory allocation.
Generic function to combine the elements using a custom set of aggregation functions.
Generic function to combine the elements using a custom set of aggregation functions. Turns an SCollection[T] into a result of type SCollection[C], for a "combined type" C. Note that V and C can be different -- for example, one might combine an SCollection of type Int into an SCollection of type Seq[Int]. Users provide three functions:
- createCombiner
, which turns a V into a C (e.g., creates a one-element list)
- mergeValue
, to merge a V into a C (e.g., adds it to the end of a list)
- mergeCombiners
, to combine two C's into a single one.
The ScioContext associated with this PCollection.
The ScioContext associated with this PCollection.
Fold with Monoid, which defines the associative function and "zero value" for T.
Fold with Monoid, which defines the associative function and "zero value" for T. This could be more powerful and better optimized in some cases.
Aggregate the elements using a given associative function and a neutral "zero value".
Aggregate the elements using a given associative function and a neutral "zero value". The function op(t1, t2) is allowed to modify t1 and return it as its result value to avoid object allocation; however, it should not modify t2.
The PCollection being wrapped internally.
The PCollection being wrapped internally.
Reduce the elements of this SCollection using the specified commutative and associative binary operator.
Reduce with Semigroup.
Reduce with Semigroup. This could be more powerful and better optimized in some cases.
An enhanced SCollection that uses an intermediate node to combine parts of the data to reduce load on the final global combine step.