Github user parthchandra commented on a diff in the pull request:
https://github.com/apache/drill/pull/1184#discussion_r184243856
--- 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 --
Hmm. That takes us back to the original problem, that of the
date|time|timestamp field inside a complex object.
```
select t.context.date, t.context from test t;
will return a java.sql.Date object for column 1, but a java.time.LocalDate
for the same object inside column 2. This doesn't seem like a good thing.
```
Why should that be a bad thing though? Ultimately, the object returned by
getObject() is displayed to the end user thru the toString method. The string
representation of Local[Date|Time|Timestamp] should be the same as that of
java.sql.[Date|Time|Timestamp]. Isn't it?
---