[GitHub] carbondata pull request #2304: [CARBONDATA-2477]Fixed No dictionary Complex ...
Github user asfgit closed the pull request at: https://github.com/apache/carbondata/pull/2304 ---
[GitHub] carbondata pull request #2304: [CARBONDATA-2477]Fixed No dictionary Complex ...
Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2304#discussion_r15431 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java --- @@ -353,6 +427,32 @@ public double getDouble(int rowId) { return data; } + @Override public byte[] getComplexChildrenLVFlattenedBytePage() throws IOException { +// output LV encoded byte array +int offset = 0; +byte[] data = new byte[totalLength + pageSize * 2]; +for (int rowId = 0; rowId < pageSize; rowId++) { + short length = (short) (rowOffset[rowId + 1] - rowOffset[rowId]); + ByteUtil.setShort(data, offset, length); + copyBytes(rowId, data, offset + 2, length); + offset += 2 + length; +} +return data; + } + + @Override + public byte[] getComplexParentFlattenedBytePage() throws IOException { --- End diff -- Check and remove if not required ---
[GitHub] carbondata pull request #2304: [CARBONDATA-2477]Fixed No dictionary Complex ...
Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2304#discussion_r15269 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java --- @@ -202,9 +249,36 @@ private static ColumnPage getLVBytesColumnPage(TableSpec.ColumnSpec columnSpec, lvEncodedOffset = 0; for (int i = 0; i < numRows; i++) { length = rowLength.get(i); - page.putBytes(i, lvEncodedBytes, lvEncodedOffset + 4, length); - lvEncodedOffset += 4 + length; + page.putBytes(i, lvEncodedBytes, lvEncodedOffset + lvLength, length); + lvEncodedOffset += lvLength + length; } +return page; + } + + private static ColumnPage getComplexParentBytesColumnPage(TableSpec.ColumnSpec columnSpec, --- End diff -- Check and remove if not required ---