vdiravka commented on a change in pull request #2431:
URL: https://github.com/apache/drill/pull/2431#discussion_r788918641
##########
File path:
contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/writers/primitive/HiveTimestampWriter.java
##########
@@ -33,10 +34,14 @@ public HiveTimestampWriter(PrimitiveObjectInspector
inspector, TimeStampWriter w
@Override
public void write(Object value) {
- String timestampString = PrimitiveObjectInspectorUtils.getString(value,
inspector);
- long timestampMillis = new
DateTime(Timestamp.valueOf(timestampString).getTime())
- .withZoneRetainFields(DateTimeZone.UTC).getMillis();
- writer.writeTimeStamp(timestampMillis);
+ if (value instanceof LongWritable) {
+ writer.writeTimeStamp(((LongWritable) value).get() / 1000);
Review comment:
```suggestion
writer.writeTimeStamp(((LongWritable) value).get() /
DateTimeConstants.MILLIS_PER_SECOND);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]