Max
Provides a variety of different transforms for computing the maximum values in a collection, either globally or for each key.
Examples
Example 1: get the maximum of a PCollection
of Doubles
.
Example 2: calculate the maximum of the Integers
associated
with each unique key (which is of type String
).
Example 3:
Example 4:
Related transforms
- Min for computing minimum values in a collection
- Mean for computing the arithmetic mean of the elements in a collection
- Combine for combining all values associated with a key to a single result
Last updated on 2024/12/20
Have you found everything you were looking for?
Was it all useful and clear? Is there anything that you would like to change? Let us know!