Github user jiang-wu commented on a diff in the pull request: https://github.com/apache/drill/pull/1184#discussion_r180933601 --- Diff: exec/vector/src/main/codegen/templates/FixedValueVectors.java --- @@ -509,15 +509,15 @@ public long getTwoAsLong(int index) { public ${friendlyType} getObject(int index) { org.joda.time.DateTime date = new org.joda.time.DateTime(get(index), org.joda.time.DateTimeZone.UTC); date = date.withZoneRetainFields(org.joda.time.DateTimeZone.getDefault()); - return date; + return new java.sql.Date(date.getMillis()); --- End diff -- BTW, Drill internally tries to fool around with the timezone to preserve the "textual representation" look complex. I am not convinced this is the "right" way to handle time. But in any case, that is outside of the scope of this change. I mentioned in the Jira a comment on how such timezone manipulation is dangerous and lead to errors. I ran into that when attempting at creating a unit test for the change made in the pull request.
---