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



##########
File path: 
processing/src/main/java/org/apache/druid/query/aggregation/any/StringAnyAggregatorFactory.java
##########
@@ -77,6 +82,37 @@ public BufferAggregator 
factorizeBuffered(ColumnSelectorFactory metricFactory)
     return new 
StringAnyBufferAggregator(metricFactory.makeColumnValueSelector(fieldName), 
maxStringBytes);
   }
 
+  @Override
+  public VectorAggregator factorizeVector(VectorColumnSelectorFactory 
selectorFactory)
+  {
+
+    ColumnCapabilities capabilities = 
selectorFactory.getColumnCapabilities(fieldName);
+    if (capabilities == null || capabilities.hasMultipleValues().isFalse()) {
+      return new StringAnyVectorAggregator(
+          
selectorFactory.makeSingleValueDimensionSelector(DefaultDimensionSpec.of(fieldName)),
+          null,
+          maxStringBytes
+      );
+    } else {
+      return new StringAnyVectorAggregator(
+          null,
+          
selectorFactory.makeMultiValueDimensionSelector(DefaultDimensionSpec.of(fieldName)),
+          maxStringBytes
+      );
+
+    }
+  }
+
+  @Override
+  public boolean canVectorize(ColumnInspector columnInspector)
+  {
+    if (fieldName != null) {
+      ColumnCapabilities capabilities = 
columnInspector.getColumnCapabilities(fieldName);
+      return capabilities == null || capabilities.getType() == 
ValueType.STRING;

Review comment:
       should any column type be allowed?




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to