leventov commented on a change in pull request #8089: add 
CachingClusteredClient benchmark, refactor some stuff
URL: https://github.com/apache/incubator-druid/pull/8089#discussion_r304465205
 
 

 ##########
 File path: 
core/src/test/java/org/apache/druid/common/guava/ComplexSequenceTest.java
 ##########
 @@ -88,20 +88,15 @@ public Integer accumulate(Integer accumulated, Integer in)
     return Sequences.concat(Arrays.asList(sequences));
   }
 
-  private final BinaryFn<Integer, Integer, Integer> plus = new 
BinaryFn<Integer, Integer, Integer>()
-  {
-    @Override
-    public Integer apply(Integer arg1, Integer arg2)
-    {
-      if (arg1 == null) {
-        return arg2;
-      }
-
-      if (arg2 == null) {
-        return arg1;
-      }
+  private final CombiningFunction<Integer> plus = (arg1, arg2) -> {
 
 Review comment:
   Please make this function static. I would call it PLUS_NULLABLE to highlight 
why it's not just `Integer::sum`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to