Github user akashrn5 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2872#discussion_r234233366
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
 ---
    @@ -119,24 +120,34 @@ public ColumnPage decode(byte[] input, int offset, 
int length)
             return LazyColumnPage.newPage(page, converter);
           }
     
    -      @Override
    -      public void decodeAndFillVector(byte[] input, int offset, int length,
    -          ColumnVectorInfo vectorInfo, BitSet nullBits, boolean 
isLVEncoded)
    -          throws MemoryException, IOException {
    -        ColumnPage page = null;
    -        if (DataTypes.isDecimal(meta.getSchemaDataType())) {
    -          page = ColumnPage.decompressDecimalPage(meta, input, offset, 
length);
    -          vectorInfo.decimalConverter = ((DecimalColumnPage) 
page).getDecimalConverter();
    +      @Override public void decodeAndFillVector(byte[] input, int offset, 
int length,
    +          ColumnVectorInfo vectorInfo, BitSet nullBits, boolean 
isLVEncoded, int pageSize,
    +          ReusableDataBuffer reusableDataBuffer) throws MemoryException, 
IOException {
    +        Compressor compressor =
    +            
CompressorFactory.getInstance().getCompressor(meta.getCompressorName());
    +        byte[] unCompressData;
    +        if (null != reusableDataBuffer && 
compressor.supportReusableBuffer()) {
    +          int uncompressedLength = compressor.unCompressedLength(input, 
offset, length);
    +          unCompressData = 
reusableDataBuffer.getDataBuffer(uncompressedLength);
             } else {
    -          page = ColumnPage.decompress(meta, input, offset, length, 
isLVEncoded);
    +          unCompressData = compressor.unCompressByte(input, offset, 
length);
             }
    -        page.setNullBits(nullBits);
    -        converter.decodeAndFillVector(page, vectorInfo);
    +        compressor.rawUncompress(input, offset, length, unCompressData);
    --- End diff --
    
    i think, when ZSTD compressor is configured, it will throw unsupported 
exception, plese check and handle for `AdaptiveIntegralCodec` and 
`AdaptiveDeltaIntegralCodec`


---

Reply via email to