carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sounakr <...@git.apache.org>
Subject [GitHub] carbondata pull request #1079: [WIP]Measure Filter implementation
Date Sun, 02 Jul 2017 20:30:41 GMT
Github user sounakr commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1079#discussion_r125191810
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java ---
    @@ -395,6 +440,58 @@ public static DimColumnFilterInfo getNoDictionaryValKeyMemberForFilter(
       }
     
       /**
    +   * This method will get the no dictionary data based on filters and same
    +   * will be in ColumnFilterInfo
    +   *
    +   * @param evaluateResultListFinal
    +   * @param isIncludeFilter
    +   * @return ColumnFilterInfo
    +   */
    +  public static ColumnFilterInfo getMeasureValKeyMemberForFilter(
    +      List<String> evaluateResultListFinal, boolean isIncludeFilter, DataType dataType,
    +      CarbonMeasure carbonMeasure) throws FilterUnsupportedException {
    +    List<byte[]> filterValuesList = new ArrayList<byte[]>(20);
    +    String result = null;
    +    try {
    +      int length = evaluateResultListFinal.size();
    +      for (int i = 0; i < length; i++) {
    +        result = evaluateResultListFinal.get(i);
    +        if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(result)) {
    +          filterValuesList.add(new byte[0]);
    +          continue;
    +        }
    +        // TODO have to understand what method to be used for measures.
    +        // filterValuesList
    +        //  .add(DataTypeUtil.getBytesBasedOnDataTypeForNoDictionaryColumn(result, dataType));
    +
    +        filterValuesList
    +            .add(DataTypeUtil.getMeasureByteArrayBasedOnDataTypes(result, dataType, carbonMeasure));
    --- End diff --
    
    Currently we are storing filter keys of measures in byte array format. In next optimization
phase will change to Object array of respective type to avoid conversion. 


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