Akshat-Jain commented on code in PR #16682:
URL: https://github.com/apache/druid/pull/16682#discussion_r1668598952
##########
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:
@LakshSingla
The suggestion seems like
```
throw new UOE(
a,
b);
```
which feels weird? 😅
--
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]