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 #971: [CARBONDATA-1015] Extract interface in data lo...
Date Fri, 02 Jun 2017 08:14:19 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/971#discussion_r119802768
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java ---
    @@ -841,17 +837,14 @@ public static WriterCompressModel getValueCompressionModel(
          */
         for (int i = 0; i < dataTypeSelected.length; i++) {  // always 1
           ValueEncoderMeta valueEncoderMeta = encodeMetaList.get(i);
    -      maxValue[i] = valueEncoderMeta.getMaxValue();
    -      minValue[i] = valueEncoderMeta.getMinValue();
    -      uniqueValue[i] = valueEncoderMeta.getUniqueValue();
    +      max[i] = valueEncoderMeta.getMaxValue();
    +      min[i] = valueEncoderMeta.getMinValue();
    +      nonExistValue[i] = valueEncoderMeta.getUniqueValue();
           decimal[i] = valueEncoderMeta.getDecimal();
           type[i] = valueEncoderMeta.getType();
           dataTypeSelected[i] = valueEncoderMeta.getDataTypeSelected();
         }
    -    MeasureMetaDataModel measureMetadataModel =
    -        new MeasureMetaDataModel(minValue, maxValue, decimal, dataTypeSelected.length,
uniqueValue,
    -            type, dataTypeSelected);
    -    return ValueCompressionUtil.getWriterCompressModel(measureMetadataModel);
    +    return MeasurePageStatistics.build(min, max, nonExistValue, decimal, type, dataTypeSelected);
    --- End diff --
    
    Better pass `ValueEncoderMeta` list to `build` method to avoid duplicate code in other
places


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