somandal commented on code in PR #16094:
URL: https://github.com/apache/pinot/pull/16094#discussion_r2193085097
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java:
##########
@@ -743,7 +743,17 @@ public static List<Map<String, String>> flatten(String
jsonString, JsonIndexConf
throw e;
}
}
- return JsonUtils.flatten(jsonNode, jsonIndexConfig);
+
+ try {
+ return JsonUtils.flatten(jsonNode, jsonIndexConfig);
+ } catch (IllegalArgumentException e) {
+ // IllegalArgumentException is a catch-all Exception from
'JsonUtils.flatten()' for scenarios other than OOM
+ if (jsonIndexConfig.getSkipInvalidJson()) {
+ return SKIPPED_FLATTENED_RECORD;
+ } else {
+ throw e;
+ }
+ }
Review Comment:
ah good catch, done
--
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]