ajantha-bhat commented on a change in pull request #3638: [CARBONDATA-3731]
Avoid data copy in Writer
URL: https://github.com/apache/carbondata/pull/3638#discussion_r387467031
##########
File path:
core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
##########
@@ -143,10 +144,17 @@ public static ColumnPage
newLocalDictPage(ColumnPageEncoderMeta columnPageEncode
boolean isDecoderBasedFallBackEnabled =
Boolean.parseBoolean(CarbonProperties.getInstance()
.getProperty(CarbonCommonConstants.LOCAL_DICTIONARY_DECODER_BASED_FALLBACK,
CarbonCommonConstants.LOCAL_DICTIONARY_DECODER_BASED_FALLBACK_DEFAULT));
+ DataType dataType = columnPageEncoderMeta.getStoreDataType();
ColumnPage actualPage;
ColumnPage encodedPage;
if (isUnsafeEnabled(columnPageEncoderMeta)) {
- actualPage = new UnsafeVarLengthColumnPage(columnPageEncoderMeta,
pageSize);
+ if (dataType == DataTypes.STRING ||
+ dataType == DataTypes.VARCHAR ||
+ dataType == DataTypes.BINARY) {
+ actualPage = new ByteBufferColumnPage(columnPageEncoderMeta, pageSize);
+ } else {
+ actualPage = new UnsafeVarLengthColumnPage(columnPageEncoderMeta,
pageSize);
Review comment:
local dictionary supported for string and varchar. so this may be dead code
now. remove it
----------------------------------------------------------------
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