clintropolis commented on code in PR #12552:
URL: https://github.com/apache/druid/pull/12552#discussion_r880168358
##########
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:
to be consistent with the behavior of other calls to
`DimensionHandlerUtils.convertObjectToX`, which is used by the grouper to
ensure everything is expected and consistent type (both to handle schema
differences between segments and also handle jackson changing types like
doubles to floats, longs to ints, etc), these methods should be coercing the
elements I think, so the List case is probably wrong.
--
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]