clintropolis commented on code in PR #14542:
URL: https://github.com/apache/druid/pull/14542#discussion_r1262015914
##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchBuildAggregatorFactory.java:
##########
@@ -221,11 +226,21 @@ private HllSketchUpdater
formulateSketchUpdater(ColumnSelectorFactory columnSele
}
};
break;
+ case ARRAY:
+ final ExpressionType expressionType =
ExpressionType.fromColumnTypeStrict(capabilities);
+ updater = sketch -> {
+ final Object o = selector.getObject();
+ if (o != null) {
+ byte[] bytes = ExprEval.toBytes(expressionType, o);
+ sketch.get().update(bytes);
+ }
+ };
+ break;
Review Comment:
My intention was for `processAsArrays` to only have effect when the input
types are unknown, e.g. ingestion time, to serve as a switch on whether or not
to treat `List` as a MVD or an ARRAY. If we have the actual type information it
means we are operating on top of a column, and so my plan was that this setting
has no effect and it should definitely use array processing.
I was not imagining `processAsArray` as a feature flag on whether or not we
handle arrays at all
--
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]