jasonk000 commented on a change in pull request #12177:
URL: https://github.com/apache/druid/pull/12177#discussion_r819152744
##########
File path:
core/src/main/java/org/apache/druid/java/util/common/parsers/JSONFlattenerMaker.java
##########
@@ -108,6 +108,22 @@ public Object getRootField(final JsonNode obj, final
String key)
}
}
+ @Override
+ public Function<JsonNode, Object> makeJsonTreeExtractor(final List<String>
nodes)
+ {
+ String[] keyNames = nodes.toArray(new String[0]);
+ return jsonNode -> {
+ JsonNode targetNode = jsonNode;
+ for (String keyName : keyNames) {
+ targetNode = targetNode.get(keyName);
+ if (targetNode == null) {
+ break;
Review comment:
fixed in 9b283122f9
##########
File path:
core/src/main/java/org/apache/druid/java/util/common/parsers/JSONFlattenerMaker.java
##########
@@ -108,6 +108,22 @@ public Object getRootField(final JsonNode obj, final
String key)
}
}
+ @Override
+ public Function<JsonNode, Object> makeJsonTreeExtractor(final List<String>
nodes)
+ {
+ String[] keyNames = nodes.toArray(new String[0]);
Review comment:
added a comment to explain in 9b283122f9
--
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]