You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/04/30 20:38:27 UTC

[GitHub] [beam] jhnmora000 commented on a change in pull request #11333: [BEAM-9418] Support ANY_VALUE aggregation functions

jhnmora000 commented on a change in pull request #11333:
URL: https://github.com/apache/beam/pull/11333#discussion_r418274875



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Sample.java
##########
@@ -58,6 +58,14 @@
     return new SampleAnyCombineFn<>(sampleSize);
   }
 
+  /**
+   * Returns a {@link CombineFn} that computes a single and potentially non-uniform sample value of
+   * its inputs.
+   */
+  public static <T> CombineFn<T, ?, T> anyValueCombineFn() {

Review comment:
       To be frank with you, I copied the the method [anyCombineFn](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Sample.java#L57) and just adapted it. So, I am not sure the reason behind the template usage, I wanted to stick to existing methods.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org