clintropolis commented on code in PR #12873:
URL: https://github.com/apache/druid/pull/12873#discussion_r940599428
##########
core/src/main/java/org/apache/druid/java/util/common/parsers/JSONFlattenerMaker.java:
##########
@@ -157,12 +165,13 @@ private Object convertJsonNode(JsonNode val)
Map<String, Object> newMap = new LinkedHashMap<>();
for (Iterator<Map.Entry<String, JsonNode>> it = val.fields();
it.hasNext(); ) {
Map.Entry<String, JsonNode> entry = it.next();
- newMap.put(entry.getKey(), valueConversionFunction(entry.getValue()));
+ newMap.put(entry.getKey(), finalizeConversionForMap(entry.getValue()));
}
return newMap;
}
- return val;
+ // turn anything else into a string value so that we don't leak JsonNode
into rows
+ return val.asText();
Review Comment:
Yeah, I agree we are handling all of the cases of value types, and arrays
and objects are handled, so returning `null` seems reasonable for the special
Jackson node types.
--
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]