wirybeaver commented on code in PR #12238: URL: https://github.com/apache/pinot/pull/12238#discussion_r1450677667
########## pinot-spi/src/main/java/org/apache/pinot/spi/utils/JsonUtils.java: ########## @@ -719,4 +719,18 @@ private static void addFieldToPinotSchema(Schema pinotSchema, DataType dataType, } } } + + public static List<Map<String, String>> flatten(String jsonString, JsonIndexConfig jsonIndexConfig) throws IOException { + JsonNode jsonNode; + try { + jsonNode = JsonUtils.stringToJsonNode(jsonString); + } catch (IOException e) { + if (jsonIndexConfig.getSkipInvalidJson()) { + return Collections.singletonList(Collections.singletonMap(VALUE_KEY, SKIPPED_VALUE_REPLACEMENT)); Review Comment: good catch -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org