Skip to content

Commit

Permalink
[CARBONDATA-2972] Debug Logs and function added for Adaptive Encoding
Browse files Browse the repository at this point in the history
Added a function to get the type of encoding used. Added the debug log for checking which type of encoding is used

This closes #2758
  • Loading branch information
Manish Nalla authored and manishgupta88 committed Sep 27, 2018
1 parent 1b4109d commit 54bcf49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@ public DataType getTargetDataType(ColumnPage inputPage) {
}
}

public Encoding getEncodingType() {
List<Encoding> currEncodingList = getEncodingList();
if (CarbonUtil.isEncodedWithMeta(currEncodingList)) {
return currEncodingList.get(0);
}
return null;
}

/**
* Return a encoded column page by encoding the input page
* The encoded binary data and metadata are wrapped in encoding column page
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ private EncodedColumnPage[] encodeAndCompressDimensions()
"Encoder result ---> Source data type: " + noDictDimensionPages[noDictIndex]
.getDataType().getName() + " Destination data type: " + targetDataType
.getName() + " for the column: " + noDictDimensionPages[noDictIndex]
.getColumnSpec().getFieldName());
.getColumnSpec().getFieldName() + " having encoding type: "
+ columnPageEncoder.getEncodingType());
}
}
noDictIndex++;
Expand Down

0 comments on commit 54bcf49

Please sign in to comment.