cryptoe commented on code in PR #15516:
URL: https://github.com/apache/druid/pull/15516#discussion_r1440101620
##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchAggregatorFactory.java:
##########
@@ -62,6 +63,31 @@ public abstract class HllSketchAggregatorFactory extends
AggregatorFactory
private final boolean shouldFinalize;
private final boolean round;
+ HllSketchAggregatorFactory(
+ final String name,
+ final String fieldName,
+ @Nullable final Integer lgK,
+ @Nullable final String tgtHllType,
+ @Nullable final StringEncoding stringEncoding,
+ final Boolean shouldFinalize,
+ final boolean round,
+ final int maxLgK
+ )
+ {
+ this(name, fieldName, lgK, tgtHllType, stringEncoding, shouldFinalize,
round);
+
+ if (this.lgK > maxLgK) {
+ throw DruidException.forPersona(DruidException.Persona.USER)
+ .ofCategory(DruidException.Category.INVALID_INPUT)
+ .build(
+ "LgK value [%s] for HLL sketch cannot be greater
than [%s]. Reduce the lgK value"
Review Comment:
Please mention the name as well.
--
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]