FrankChen021 commented on code in PR #19390:
URL: https://github.com/apache/druid/pull/19390#discussion_r3159120580


##########
processing/src/main/java/org/apache/druid/query/aggregation/NullableNumericAggregatorFactory.java:
##########
@@ -111,6 +116,27 @@ public final int getMaxIntermediateSizeWithNulls()
     return getMaxIntermediateSize() + Byte.BYTES;
   }
 
+  private boolean useNullableNumericAggregators(ColumnInspector 
columnInspector)
+  {
+    if (forceNotNullable()) {
+      return false;
+    }
+
+    final String inputColumn = getInputColumn();
+    if (inputColumn == null) {
+      return true;
+    }
+
+    final ColumnCapabilities capabilities = 
columnInspector.getColumnCapabilities(inputColumn);
+    return !(Types.isNumeric(capabilities) && 
capabilities.hasNulls().isFalse());
+  }

Review Comment:
   Added non-buffered factorize coverage for both known no-null and 
unknown-nullability cases. I left vector coverage out because the wrapper 
decision shares the same helper and vector selector setup is more involved than 
what this focused unit test needs to validate.



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