carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manishgupta88 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1297: [CARBONDATA-1429] Add a value based compressi...
Date Thu, 14 Sep 2017 16:17:23 GMT
Github user manishgupta88 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1297#discussion_r138941549
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/VarLengthColumnPageBase.java
---
    @@ -22,21 +22,48 @@
     import java.util.List;
     
     import org.apache.carbondata.core.datastore.TableSpec;
    +import org.apache.carbondata.core.memory.CarbonUnsafe;
    +import org.apache.carbondata.core.memory.MemoryBlock;
     import org.apache.carbondata.core.memory.MemoryException;
    +import org.apache.carbondata.core.memory.UnsafeMemoryManager;
     import org.apache.carbondata.core.metadata.datatype.DataType;
     import org.apache.carbondata.core.metadata.datatype.DecimalConverterFactory;
     import org.apache.carbondata.core.util.ByteUtil;
    +import org.apache.carbondata.core.util.ThreadLocalTaskInfo;
     
    +import static org.apache.carbondata.core.metadata.datatype.DataType.BYTE;
     import static org.apache.carbondata.core.metadata.datatype.DataType.DECIMAL;
     
     public abstract class VarLengthColumnPageBase extends ColumnPage {
     
    +  static final int byteBits = BYTE.getSizeBits();
    +  static final int shortBits = DataType.SHORT.getSizeBits();
    +  static final int intBits = DataType.INT.getSizeBits();
    +  static final int longBits = DataType.LONG.getSizeBits();
    +  // default size for each row, grows as needed
    +  static final int DEFAULT_ROW_SIZE = 8;
    +
    +  static final double FACTOR = 1.25;
    +
    +  final long taskId = ThreadLocalTaskInfo.getCarbonTaskInfo().getTaskId();
    +
    +  // memory allocated by Unsafe
    +  MemoryBlock memoryBlock;
    --- End diff --
    
    SafeDecimalColumnPage  will handle both fixed and variable implementation of decimal data
based on precsion. So it is also required to be extended from VarLengthColumnPageBase


---

Mime
View raw message