You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/11/08 21:33:45 UTC

[GitHub] [incubator-druid] clintropolis commented on a change in pull request #8815: SQL: EARLIEST, LATEST aggregators.

clintropolis commented on a change in pull request #8815: SQL: EARLIEST, LATEST aggregators.
URL: https://github.com/apache/incubator-druid/pull/8815#discussion_r344375327
 
 

 ##########
 File path: sql/src/main/java/org/apache/druid/sql/calcite/aggregation/Aggregations.java
 ##########
 @@ -48,10 +49,18 @@ private Aggregations()
       final Project project
   )
   {
-    return call.getArgList().stream()
-               .map(i -> Expressions.fromFieldAccess(rowSignature, project, i))
-               .map(rexNode -> toDruidExpressionForSimpleAggregator(plannerContext, rowSignature, rexNode))
-               .collect(Collectors.toList());
+    final List<DruidExpression> args = call
+        .getArgList()
+        .stream()
+        .map(i -> Expressions.fromFieldAccess(rowSignature, project, i))
+        .map(rexNode -> toDruidExpressionForSimpleAggregator(plannerContext, rowSignature, rexNode))
+        .collect(Collectors.toList());
+
+    if (args.stream().noneMatch(Objects::isNull)) {
 
 Review comment:
   Could you add a comment here explaining why we do this part? It seems not obvious to me

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org