carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CarbonDataQA <...@git.apache.org>
Subject [GitHub] carbondata pull request #1254: [CARBONDATA-1379] Fixed Date range filter wit...
Date Fri, 18 Aug 2017 17:16:47 GMT
Github user CarbonDataQA commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1254#discussion_r134010107
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/keygenerator/directdictionary/timestamp/DateDirectDictionaryGenerator.java
---
    @@ -154,14 +147,14 @@ private int generateDirectSurrogateKeyForNonTimestampType(String
memberStr) {
       }
     
       private int generateKey(long timeValue) {
    -    long milli = timeValue + threadLocalLocalTimeZone.get().getOffset(timeValue);
    -    return (int) Math.floor((double) milli / MILLIS_PER_DAY) + cutOffDate;
    +    return (int) Math.floor((double) timeValue / MILLIS_PER_DAY) + cutOffDate;
       }
     
       public void initialize() {
         if (simpleDateFormatLocal.get() == null) {
           simpleDateFormatLocal.set(new SimpleDateFormat(dateFormat));
           simpleDateFormatLocal.get().setLenient(false);
    +      simpleDateFormatLocal.get().setTimeZone(TimeZone.getTimeZone("GMT"));
    --- End diff --
    
    Loading and querying both uses GMT here only for date, we should not be based on machines
timezone as it gives issues


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