Github user amansinha100 commented on a diff in the pull request: https://github.com/apache/drill/pull/594#discussion_r100653436 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReader.java --- @@ -492,10 +537,18 @@ private void writeDataAllText(MapWriter map, FieldSelection selection, } } map.end(); - } /** + * Puts copy of field path list to fieldPathWriter map. + * @param fieldName + */ + private void putFieldPath(String fieldName, MapWriter map) { + List<String> fieldPath = Lists.newArrayList(path); --- End diff -- Before allocating the fieldPath list, should we first check if it is already present in the fieldPathWriter ? This function is called for every null value which makes it quite expensive (as shown by your performance experiments). If there are 1000 records of type {'x': null}, ideally we want to call this method only for field 'x' once.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---