abhishekagarwal87 commented on a change in pull request #10304:
URL: https://github.com/apache/druid/pull/10304#discussion_r478327250
##########
File path:
extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/ApproximateHistogramAggregatorFactory.java
##########
@@ -102,6 +105,21 @@ public BufferAggregator
factorizeBuffered(ColumnSelectorFactory metricFactory)
);
}
+ @Override
+ public VectorAggregator factorizeVector(VectorColumnSelectorFactory
metricVectorFactory)
+ {
+ return new ApproximateHistogramVectorAggregator(
+ metricVectorFactory.makeValueSelector(fieldName),
+ resolution
+ );
+ }
+
+ @Override
+ public boolean canVectorize(ColumnInspector columnInspector)
+ {
+ return true;
Review comment:
The approximate histogram aggregators do not handle the strings. The way
I see it, `canVectorize` only indicates when the aggregation cannot be
vectorized. E.g. fixed bucket aggregator factory can aggregate complex objects
but not with vectorization and this is what `canVectorize` in
fixedBucket**Factory checks.
In this class, any type that can be aggregated in regular aggregators, is
supported by vector aggregator as well. Any type that is not supported by
regular aggregator is not supported by vector aggregator as well. Hence the
method `canVectorize` just returns true.
do you think it would still make sense to check for input type?
----------------------------------------------------------------
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]