somu-imply commented on code in PR #14924:
URL: https://github.com/apache/druid/pull/14924#discussion_r1316153587


##########
processing/src/main/java/org/apache/druid/query/aggregation/last/DoubleLastAggregatorFactory.java:
##########
@@ -116,7 +116,8 @@ public Aggregator factorize(ColumnSelectorFactory 
metricFactory)
   @Override
   public boolean canVectorize(ColumnInspector columnInspector)
   {
-    return true;
+    final ColumnCapabilities capabilities = 
columnInspector.getColumnCapabilities(fieldName);
+    return capabilities != null && capabilities.isNumeric();

Review Comment:
   I did the same initially, but the get of NumericNilVectorAggregator would 
only return a null and not a 0 as the non-vectorized parts do.  One solution 
would be to update the NumercNilVectorAggregator to return a serializablePair 
with the rhs as 0 on case of a null, but I am unsure if that will break 
anything else. I'll try to go down that path too



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