drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parthchandra <...@git.apache.org>
Subject [GitHub] drill pull request #595: DRILL-4203: Parquet File. Date is stored wrongly
Date Mon, 10 Oct 2016 21:53:37 GMT
Github user parthchandra commented on a diff in the pull request:

    https://github.com/apache/drill/pull/595#discussion_r82690304
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/FixedByteAlignedReader.java
---
    @@ -161,7 +160,7 @@ void addNext(int start, int index) {
             intValue = readIntLittleEndian(bytebuf, start);
           }
     
    -      mutator.set(index, DateTimeUtils.fromJulianDay(intValue + ParquetReaderUtility.CORRECT_CORRUPT_DATE_SHIFT));
    +      mutator.set(index, (intValue - ParquetReaderUtility.CORRECT_CORRUPT_DATE_SHIFT)
* DateTimeConstants.MILLIS_PER_DAY);
    --- End diff --
    
    Reviewing this math can give anyone a headache :(. But it is correct.


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