clintropolis commented on code in PR #14542:
URL: https://github.com/apache/druid/pull/14542#discussion_r1262014130


##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/HllSketchBuildUtil.java:
##########
@@ -33,19 +34,34 @@
 
 public class HllSketchBuildUtil
 {
-  public static void updateSketch(final HllSketch sketch, final StringEncoding 
stringEncoding, final Object value)
+  public static void updateSketch(
+      final HllSketch sketch,
+      final StringEncoding stringEncoding,
+      final Object value,
+      final boolean processAsArray
+  )
   {
     if (value instanceof Integer || value instanceof Long) {
       sketch.update(((Number) value).longValue());
     } else if (value instanceof Float || value instanceof Double) {
       sketch.update(((Number) value).doubleValue());
     } else if (value instanceof String) {
       updateSketchWithString(sketch, stringEncoding, (String) value);
+    } else if (value instanceof Object[] && processAsArray) {
+      byte[] arrayBytes = ExprEval.toBytesBestEffort(value);
+      sketch.update(arrayBytes);
     } else if (value instanceof List) {

Review Comment:
   I don't think so, `Object[]` should only occur from transforms which output 
ARRAY types, which were previously unhandled. I don't want to increase the 
footprint of MVDs when i'm trying to shrink them as much as possible.



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