cryptoe commented on code in PR #12552:
URL: https://github.com/apache/druid/pull/12552#discussion_r879419823


##########
processing/src/main/java/org/apache/druid/segment/DimensionHandlerUtils.java:
##########
@@ -402,7 +424,14 @@ public static ComparableList convertToList(Object obj)
     if (obj instanceof ComparableList) {
       return (ComparableList) obj;
     }
-    throw new ISE("Unable to convert type %s to %s", obj.getClass().getName(), 
ComparableList.class.getName());
+    if (obj instanceof Object[]) {
+      List<T> delegateList = new ArrayList<T>();
+      for (Object eachObj : (Object[]) obj) {
+        delegateList.add(convertFunction.apply(eachObj));

Review Comment:
   Yes, there is a test case for it. 
   `GroupByQueryTestRunner#testGroupByWithLongArrays()`
   on further inspection, its returning doubles in the output. That looks 
incorrect to me. 
   
   Which means we might have to transform the list as well. Similar argument 
can be made for the String Array stuff as well. 
   
   WDYT ?



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