kgyrtkirk commented on code in PR #14748:
URL: https://github.com/apache/druid/pull/14748#discussion_r1295616451


##########
processing/src/main/java/org/apache/druid/query/aggregation/NullableNumericAggregatorFactory.java:
##########
@@ -85,6 +85,12 @@ public final int getMaxIntermediateSizeWithNulls()
     return getMaxIntermediateSize() + (NullHandling.replaceWithDefault() ? 0 : 
Byte.BYTES);
   }
 
+  protected boolean canHandleNulls()
+  {
+    return NullHandling.replaceWithDefault();
+  }

Review Comment:
   @rohangarg @clintropolis: how do you guys see this api change?
   * it could be interpreted as something which is in conflict with the 
original intention of the interface
     * as it declares in the APIdoc that it will be `null` if nothing is 
aggregated
   * but on the otherhand it somewhat aligns with the original intention as 
well to give more fine-grained control to the  underlying aggregator on how it 
would like to handle the `null` values
   
   long story short: the situation here is that a `Long` aggregtor is needed 
which results in `0` in case of no rows being aggregated - especially in case 
`useDefaultValueForNull` is turned off



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to