suneet-s commented on a change in pull request #10401:
URL: https://github.com/apache/druid/pull/10401#discussion_r492824247



##########
File path: 
processing/src/main/java/org/apache/druid/query/aggregation/SimpleDoubleAggregatorFactory.java
##########
@@ -235,6 +244,19 @@ public String getExpression()
     return expression;
   }
 
+  @Override
+  public boolean canVectorize(ColumnInspector columnInspector)
+  {
+    if (fieldName != null) {
+      final ColumnCapabilities capabilities = 
columnInspector.getColumnCapabilities(fieldName);
+      return capabilities == null || 
ValueType.isNumeric(capabilities.getType());
+    }
+    if (expression != null) {
+      return fieldExpression.get().canVectorize(columnInspector);
+    }
+    return false;
+  }
+

Review comment:
       If I'm reading this correctly, this change isn't really needed in this 
PR, but it's some consolidation that was done across the various aggregator 
factories




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



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

Reply via email to