Github user Indhumathi27 commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2396#discussion_r197645303 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/complextypes/ArrayQueryType.java --- @@ -97,4 +99,56 @@ public void parseBlocksAndReturnComplexColumnByteArray(DimensionRawColumnChunk[] return DataTypeUtil.getDataTypeConverter().wrapWithGenericArrayData(data); } + @Override public Object getDataBasedOnColumn(ByteBuffer dataBuffer, CarbonDimension parent, + CarbonDimension child) { + int dataLength; + if (parent.getOrdinal() < child.getOrdinal()) { + dataLength = parent.getNumberOfChild(); + + if (dataLength == -1) { + return null; + } + Object[] data = new Object[dataLength]; + for (int i = 0; i < dataLength; i++) { + data[i] = children + .getDataBasedOnColumn(dataBuffer, parent.getListOfChildDimensions().get(i), child); + } + return DataTypeUtil.getDataTypeConverter().wrapWithGenericArrayData(data); + } else if (parent.getOrdinal() > child.getOrdinal()) { + return null; + } else { + // dataLength = dataBuffer.getInt(); + return DataTypeUtil.getDataTypeConverter() + .wrapWithGenericArrayData(getDataBasedOnDataType(dataBuffer)); + } + } + + @Override public Object getDataBasedOnColumnList(Map<CarbonDimension, ByteBuffer> childBuffer, --- End diff -- changed
---