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 #1626: [CARBONDATA-1519][PreAgg-Timeseries] Support ...
Date Thu, 07 Dec 2017 06:08:48 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1626#discussion_r155437483
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
---
    @@ -719,4 +719,34 @@ public long size() throws IOException {
         }
         return dataSize + indexSize;
       }
    +
    +  /**
    +   * Utility function to check whether table has timseries datamap or not
    +   * @param carbonTable
    +   * @return timeseries data map present
    +   */
    +  public static boolean hasTimeSeriesDataMap(CarbonTable carbonTable) {
    +    List<DataMapSchema> dataMapSchemaList = carbonTable.getTableInfo().getDataMapSchemaList();
    +    for (DataMapSchema dataMapSchema : dataMapSchemaList) {
    +      if (dataMapSchema instanceof AggregationDataMapSchema) {
    +        return ((AggregationDataMapSchema) dataMapSchema).isTimeseriesDataMap();
    +      }
    +    }
    +    return false;
    +  }
    +
    +  /**
    +   * Utility function to check whether table has timseries datamap or not
    +   * @param carbonTable
    +   * @return timeseries data map present
    +   */
    +  public static boolean hasAggregationDataMap(CarbonTable carbonTable) {
    --- End diff --
    
    Please move to utility


---

Mime
View raw message