ravipesala commented on a change in pull request #3201: [CARBONDATA-3371] Fix
ArrayIndexOutOfBoundsException of compaction after sort_columns modification
URL: https://github.com/apache/carbondata/pull/3201#discussion_r281502597
##########
File path:
core/src/main/java/org/apache/carbondata/core/scan/result/iterator/RawResultIterator.java
##########
@@ -194,11 +253,34 @@ public boolean hasNext() {
}
private Object[] convertRow(Object[] rawRow) throws KeyGenException {
- byte[] dims = ((ByteArrayWrapper) rawRow[0]).getDictionaryKey();
+ ByteArrayWrapper dimObject = (ByteArrayWrapper) rawRow[0];
+ byte[] dims = dimObject.getDictionaryKey();
long[] keyArray =
sourceSegProperties.getDimensionKeyGenerator().getKeyArray(dims);
byte[] covertedBytes =
destinationSegProperties.getDimensionKeyGenerator().generateKey(keyArray);
- ((ByteArrayWrapper) rawRow[0]).setDictionaryKey(covertedBytes);
+ dimObject.setDictionaryKey(covertedBytes);
+ if (hasColumnDrift) {
Review comment:
Better move this columndrift code to new method
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services