wirybeaver commented on code in PR #12238:
URL: https://github.com/apache/pinot/pull/12238#discussion_r1460134339
##########
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) {
Review Comment:
@ankitsultana @walterddr
I change the source catch JsonProcessingException in the most recent commit
because the stringToJsonNode internal invoke the DEFAULT_READER.readTree()
which throws JsonProcessingException only.
```
JsonUtils.stringToJsonNode(...) throws IOException {
DEFAULT_READER.readTree(...);
}
class ObjectReader {
public JsonNode readTree(String json) throws JsonProcessingException,
JsonMappingException;
}
```
JsonMappingException is a child of JsonProcessingException.
--
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]