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 Wed, 06 Dec 2017 15:38:58 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1626#discussion_r155271792
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/preagg/TimeSeriesFunction.java
---
    @@ -21,20 +21,46 @@
      * enum for timeseries function
      */
     public enum TimeSeriesFunction {
    -  SECOND("second"),
    -  MINUTE("minute"),
    -  HOUR("hour"),
    -  DAY("day"),
    -  MONTH("month"),
    -  YEAR("year");
    +  SECOND("second", 0),
    +  MINUTE("minute", 1),
    +  HOUR("hour", 2),
    +  DAY("day", 3),
    +  MONTH("month", 4),
    +  YEAR("year", 5);
     
       private String name;
     
    -  TimeSeriesFunction(String name) {
    +  private int ordinal;
    +
    +  TimeSeriesFunction(String name, int ordinal) {
         this.name = name;
    +    this.ordinal = ordinal;
       }
     
       public String getName() {
         return name;
       }
    +
    +  public int getOrdinal() {
    +    return ordinal;
    +  }
    +
    +//   public static TimeSeriesFunction valueOf(String name) {
    --- End diff --
    
    remove commented code


---

Mime
View raw message