LakshSingla commented on code in PR #16682:
URL: https://github.com/apache/druid/pull/16682#discussion_r1668633952


##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchMergeAggregatorFactory.java:
##########
@@ -142,6 +151,22 @@ public VectorAggregator 
factorizeVector(VectorColumnSelectorFactory selectorFact
     );
   }
 
+  private void validateInputs(@Nullable ColumnCapabilities capabilities)
+  {
+    if (capabilities != null) {
+      final ColumnType type = capabilities.toColumnType();
+      if (!ColumnType.UNKNOWN_COMPLEX.equals(type) && !TYPE.equals(type) &&
+          !(ValueType.COMPLEX.equals(type.getType()) &&
+            (Objects.equals(type.getComplexTypeName(), "HLLSketch") ||
+             Objects.equals(type.getComplexTypeName(), "HLLSketchBuild")))) {
+        throw new UOE("Using aggregation type %s is not supported for %s 
column. "
+                      + "Use a different aggregator type and run the query 
again.",
+                      getIntermediateType().getComplexTypeName(),
+                      type);

Review Comment:
   It's the positioning of the first string column and the last `);` in your 
code which is inconsistent. 



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