TSFenwick commented on code in PR #16529:
URL: https://github.com/apache/druid/pull/16529#discussion_r1635390142


##########
processing/src/main/java/org/apache/druid/segment/DimensionHandlerUtils.java:
##########
@@ -330,25 +329,67 @@ public static Long convertObjectToLong(@Nullable Object 
valObj, boolean reportPa
     } else if (valObj instanceof String) {
       Long ret = DimensionHandlerUtils.getExactLongFromDecimalString((String) 
valObj);
       if (reportParseExceptions && ret == null) {
-        throw new ParseException((String) valObj, "could not convert value 
[%s] to long", valObj);
+        final String message = (objectKey != null) ? 
StringUtils.nonStrictFormat(
+            "could not convert value [%s] to long for dimension [%s]",
+            valObj,
+            objectKey
+        ) : StringUtils.nonStrictFormat(
+            "could not convert value [%s] to long",
+            valObj
+        );
+        throw new ParseException((String) valObj, message);
       }
       return ret;
     } else if (valObj instanceof List) {
-      throw new ParseException(
-          valObj.getClass().toString(),
+      final String message = (objectKey != null) ? StringUtils.nonStrictFormat(

Review Comment:
   I dont know. I think i'd prefer to not touch that and keep this change 
smaller and to the point



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