carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1117: [CARBONDATA-757] Big decimal optimization
Date Mon, 10 Jul 2017 15:29:27 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1117#discussion_r126456038
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/page/ColumnPage.java
---
    @@ -73,54 +82,58 @@ public int getPageSize() {
         return pageSize;
       }
     
    -  private static ColumnPage createVarLengthPage(DataType dataType, int pageSize) {
    +  private static ColumnPage createVarLengthPage(DataType dataType, int pageSize, int
scale,
    +      int precision) {
         if (unsafe) {
           try {
    -        return new UnsafeVarLengthColumnPage(dataType, pageSize);
    +        return new UnsafeVarLengthColumnPage(dataType, pageSize, scale, precision);
           } catch (MemoryException e) {
             throw new RuntimeException(e);
           }
         } else {
    -      return new SafeVarLengthColumnPage(dataType, pageSize);
    +      return new SafeVarLengthColumnPage(dataType, pageSize, scale, precision);
         }
       }
     
    -  private static ColumnPage createFixLengthPage(DataType dataType, int pageSize) {
    +  private static ColumnPage createFixLengthPage(DataType dataType, int pageSize, int
scale,
    +      int precision) {
         if (unsafe) {
           try {
    -        return new UnsafeFixLengthColumnPage(dataType, pageSize);
    +        return new UnsafeFixLengthColumnPage(dataType, pageSize, scale, precision);
           } catch (MemoryException e) {
             throw new RuntimeException(e);
           }
         } else {
    -      return new SafeFixLengthColumnPage(dataType, pageSize);
    +      return new SafeFixLengthColumnPage(dataType, pageSize, scale, pageSize);
         }
       }
     
    -  private static ColumnPage createPage(DataType dataType, int pageSize) {
    +  private static ColumnPage createPage(DataType dataType, int pageSize, int scale, int
precision) {
         if (dataType.equals(BYTE_ARRAY) | dataType.equals(DECIMAL)) {
    -      return createVarLengthPage(dataType, pageSize);
    +      return createVarLengthPage(dataType, pageSize, scale, precision);
         } else {
    -      return createFixLengthPage(dataType, pageSize);
    +      return createFixLengthPage(dataType, pageSize, scale, precision);
         }
       }
     
    -  public static ColumnPage newVarLengthPath(DataType dataType, int pageSize) {
    +  public static ColumnPage newVarLengthPath(DataType dataType, int pageSize, int scale,
    --- End diff --
    
    ok


---
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