[
https://issues.apache.org/jira/browse/CARBONDATA-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15395086#comment-15395086
]
ASF GitHub Bot commented on CARBONDATA-92:
------------------------------------------
Github user ravipesala commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/50#discussion_r72383529
--- Diff:
core/src/main/java/org/carbondata/core/carbon/datastore/chunk/impl/FixedLengthDimensionDataChunk.java
---
@@ -69,9 +69,27 @@ public FixedLengthDimensionDataChunk(byte[] dataChunk,
DimensionChunkAttributes
}
/**
+ * Converts to column dictionary integer value
+ */
+ @Override public int fillConvertedChunkData(int rowId, int columnIndex,
int[] row,
+ KeyStructureInfo restructuringInfo) {
+ if (chunkAttributes.getInvertedIndexes() != null) {
+ rowId = chunkAttributes.getInvertedIndexesReverse()[rowId];
+ }
+ int start = rowId * chunkAttributes.getColumnValueSize();
+ int dict = 0;
+ for (int i = start; i < start + chunkAttributes.getColumnValueSize();
i++) {
+ dict <<= 8;
+ dict ^= dataChunk[i] & 0xFF;
+ }
+ row[columnIndex] = dict;
+ return columnIndex + 1;
--- End diff --
@kumarvishal09 I am returning the column index for next column to fill.
Please check the `ColumnGroupDimensionDataChunk.fillConvertedChunkData` to know
why I am returning the column index,
> Remove the unnecessary intermediate conversion of key while scanning.
> ---------------------------------------------------------------------
>
> Key: CARBONDATA-92
> URL: https://issues.apache.org/jira/browse/CARBONDATA-92
> Project: CarbonData
> Issue Type: Improvement
> Reporter: Ravindra Pesala
>
> Remove the unnecessary intermediate conversion of key while scanning.
> Basically it removes one step in result conversion.
> It avoids System.arraycopy while converting to result.
> It avoids the result preparation step.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)