carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1000: [CARBONDATA-1018] Add unsafe ColumnPage imple...
Date Wed, 14 Jun 2017 12:15:11 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1000#discussion_r121928939
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
---
    @@ -98,56 +117,54 @@ public static ColumnPage newPage(DataType dataType, int pageSize)
{
           default:
             throw new RuntimeException("Unsupported data dataType: " + dataType);
         }
    -    instance.stats = new ColumnPageStatsVO(dataType);
    -    instance.nullBitSet = new BitSet(pageSize);
         return instance;
       }
     
       protected static ColumnPage newBytePage(byte[] byteData) {
         ColumnPage columnPage = new ColumnPage(BYTE, byteData.length);
    -    columnPage.byteData = byteData;
    +    columnPage.setBytePage(byteData);
         return columnPage;
       }
     
    -  protected static ColumnPage newShortPage(short[] shortData) {
    -    ColumnPage columnPage = new ColumnPage(SHORT, shortData.length);
    -    columnPage.shortData = shortData;
    +  private static ColumnPage newShortPage(short[] shortData) {
    +    ColumnPage columnPage = createPage(SHORT, shortData.length);
    +    columnPage.setShortPage(shortData);
         return columnPage;
       }
     
    -  protected static ColumnPage newIntPage(int[] intData) {
    -    ColumnPage columnPage = new ColumnPage(INT, intData.length);
    -    columnPage.intData = intData;
    +  private static ColumnPage newIntPage(int[] intData) {
    +    ColumnPage columnPage = createPage(INT, intData.length);
    +    columnPage.setIntPage(intData);
         return columnPage;
       }
     
    -  protected static ColumnPage newLongPage(long[] longData) {
    -    ColumnPage columnPage = new ColumnPage(LONG, longData.length);
    -    columnPage.longData = longData;
    +  private static ColumnPage newLongPage(long[] longData) {
    +    ColumnPage columnPage = createPage(LONG, longData.length);
    +    columnPage.setLongPage(longData);
         return columnPage;
       }
     
    -  protected static ColumnPage newFloatPage(float[] floatData) {
    -    ColumnPage columnPage = new ColumnPage(FLOAT, floatData.length);
    -    columnPage.floatData = floatData;
    +  private static ColumnPage newFloatPage(float[] floatData) {
    +    ColumnPage columnPage = createPage(FLOAT, floatData.length);
    +    columnPage.setFloatPage(floatData);
         return columnPage;
       }
     
    -  protected static ColumnPage newDoublePage(double[] doubleData) {
    -    ColumnPage columnPage = new ColumnPage(DOUBLE, doubleData.length);
    -    columnPage.doubleData = doubleData;
    +  private static ColumnPage newDoublePage(double[] doubleData) {
    +    ColumnPage columnPage = createPage(DOUBLE, doubleData.length);
    +    columnPage.setDoublePage(doubleData);
         return columnPage;
       }
     
    -  protected static ColumnPage newDecimalPage(byte[][] decimalData) {
    -    ColumnPage columnPage = new ColumnPage(DECIMAL, decimalData.length);
    -    columnPage.byteArrayData = decimalData;
    +  private static ColumnPage newDecimalPage(byte[][] decimalData) {
    +    ColumnPage columnPage = createPage(DECIMAL, decimalData.length);
    +    columnPage.setByteArrayPage(decimalData);
         return columnPage;
       }
     
    -  protected static ColumnPage newVarLengthPage(byte[][] stringData) {
    -    ColumnPage columnPage = new ColumnPage(BYTE_ARRAY, stringData.length);
    -    columnPage.byteArrayData = stringData;
    +  private static ColumnPage newVarLengthPage(byte[][] byteArray) {
    +    ColumnPage columnPage = new ColumnPage(BYTE_ARRAY, byteArray.length);
    --- End diff --
    
    It supports, I will update 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message