[ 
https://issues.apache.org/jira/browse/DRILL-8109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17479495#comment-17479495
 ] 

ASF GitHub Bot commented on DRILL-8109:
---------------------------------------

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]


> Drill can not read parquet timestamp type with logical type in hive storage 
> plugin
> ----------------------------------------------------------------------------------
>
>                 Key: DRILL-8109
>                 URL: https://issues.apache.org/jira/browse/DRILL-8109
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Hive
>    Affects Versions: 1.19.0
>         Environment: drill 1.19.0 
> hive 3.12
>            Reporter: cdmikechen
>            Priority: Major
>             Fix For: 1.20.0
>
>
> Parquet timestamp int96 had been deprecated.
> https://github.com/apache/parquet-format/pull/86/files
> Many computing engines that support parquet reading (such as Hive4, Hudi, 
> Spark and so on) can use Int64 as the time storage type. When using these 
> computing engines to read parquet files, we should also support long data 
> type reading.
> We should support int64 with logical type timestamp by hive storage.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to