carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mohammadshahidkhan <...@git.apache.org>
Subject [GitHub] carbondata pull request #1126: [CARBONDATA-1258] CarbonData should not allow...
Date Tue, 19 Dec 2017 11:30:25 GMT
Github user mohammadshahidkhan commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1126#discussion_r157729475
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
---
    @@ -42,12 +42,37 @@
     
       private String dateFormat;
     
    +  /**
    +   * min value supported for date type column
    +   */
    +  private static final long MIN_VALUE;
    +  /**
    +   * MAx value supported for date type column
    +   */
    +  private static final long MAX_VALUE;
       /**
        * Logger instance
        */
       private static final LogService LOGGER =
           LogServiceFactory.getLogService(DateDirectDictionaryGenerator.class.getName());
     
    +  static {
    +    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
    +    df.setTimeZone(TimeZone.getTimeZone("GMT"));
    +    long minValue = 0;
    +    long maxValue = 0;
    +    try {
    +      minValue = df.parse("0001-01-01").getTime();
    +      maxValue = df.parse("9999-12-31").getTime();
    +    } catch (ParseException e) {
    --- End diff --
    
    Fixed


---

Mime
View raw message