Github user sounakr commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2417#discussion_r201199734 --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/ColumnPageEncoder.java --- @@ -147,10 +160,48 @@ protected void fillLegacyFields(DataChunk2 dataChunk) public static EncodedColumnPage encodedColumn(ColumnPage page) throws IOException, MemoryException { - ColumnPageEncoder encoder = new DirectCompressCodec(DataTypes.BYTE_ARRAY).createEncoder(null); - return encoder.encode(page); + ColumnPageEncoder pageEncoder = createCodecForDimension(page); + if (pageEncoder == null) { + ColumnPageEncoder encoder = new DirectCompressCodec(DataTypes.BYTE_ARRAY).createEncoder(null); + return encoder.encode(page); + } else { + LOGGER.info("Encoder result ---> Source data type: " + pageEncoder.getEncoderMeta(page) --- End diff -- Done
---