LakshSingla commented on a change in pull request #12259:
URL: https://github.com/apache/druid/pull/12259#discussion_r807563063



##########
File path: 
core/src/main/java/org/apache/druid/data/input/IntermediateRowParsingReader.java
##########
@@ -155,6 +239,24 @@ public void close() throws IOException
    */
   protected abstract List<Map<String, Object>> toMap(T intermediateRow) throws 
IOException;
 
+  private String buildParseExceptionMessage(
+      String formatString,
+      @Nullable InputEntity source,
+      @Nullable Long recordNumber,
+      Map<String, Object> metadata,
+      Object... baseArgs
+  )
+  {
+    Map<String, Object> temp = Maps.newHashMap(metadata);
+    if (source != null) {
+      temp.put("source", source.getUri());
+    }
+    if (recordNumber != null) {
+      temp.put("recordNumber", recordNumber);
+    }
+    return StringUtils.nonStrictFormat(formatString, baseArgs, temp);

Review comment:
       Separated additional information from the base exception message. 




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