Indhumathi27 commented on a change in pull request #4228: URL: https://github.com/apache/carbondata/pull/4228#discussion_r731681506
########## File path: processing/src/main/java/org/apache/carbondata/processing/datatypes/StructDataType.java ########## @@ -173,22 +174,33 @@ public boolean getIsColumnDictionary() { } @Override - public void writeByteArray(StructObject input, DataOutputStream dataOutputStream, - BadRecordLogHolder logHolder, Boolean isWithoutConverter) throws IOException { + public void writeByteArray(Object input, DataOutputStream dataOutputStream, + BadRecordLogHolder logHolder, Boolean isWithoutConverter, boolean isEmptyBadRecord) + throws IOException { dataOutputStream.writeShort(children.size()); - if (input == null) { + if (input == null || input.equals("")) { for (int i = 0; i < children.size(); i++) { - children.get(i).writeByteArray(null, dataOutputStream, logHolder, isWithoutConverter); + if (input != null && input.equals("") && (children.get(i) instanceof ArrayDataType)) { + // If child column is of array/map type and is empty, no need to iterate. Review comment: ```suggestion // If child column is of array type and is empty, no need to iterate. ``` -- 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: dev-unsubscr...@carbondata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org