[ 
https://issues.apache.org/jira/browse/HIVE-24814?focusedWorklogId=559938&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-559938
 ]

ASF GitHub Bot logged work on HIVE-24814:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/21 13:03
            Start Date: 02/Mar/21 13:03
    Worklog Time Spent: 10m 
      Work Description: pgaref commented on a change in pull request #2009:
URL: https://github.com/apache/hive/pull/2009#discussion_r585545605



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/CastTimestampToString.java
##########
@@ -28,20 +28,12 @@
 import java.time.ZoneOffset;
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatterBuilder;
-import java.time.temporal.ChronoField;
 
 public class CastTimestampToString extends TimestampToStringUnaryUDF {
   private static final long serialVersionUID = 1L;
-  private static final DateTimeFormatter PRINT_FORMATTER;
-
-  static {
-    DateTimeFormatterBuilder builder = new DateTimeFormatterBuilder();
-    // Date and time parts
-    builder.append(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
-    // Fractional part
-    builder.optionalStart().appendFraction(ChronoField.NANO_OF_SECOND, 0, 9, 
true).optionalEnd();
-    PRINT_FORMATTER = builder.toFormatter();
-  }
+  private static final DateTimeFormatter PRINT_FORMATTER =
+      new 
DateTimeFormatterBuilder().append(DateTimeFormatter.ISO_LOCAL_DATE).appendLiteral('
 ')
+          .append(DateTimeFormatter.ISO_LOCAL_TIME).toFormatter();

Review comment:
       is optional Nanotime included in ISO_LOCAL_TIME ? 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 559938)
    Time Spent: 40m  (was: 0.5h)

> Harmonize Hive Date-Time Formats
> --------------------------------
>
>                 Key: HIVE-24814
>                 URL: https://issues.apache.org/jira/browse/HIVE-24814
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Harmonize Hive on JDK date-time formats courtesy of {{DateTimeFormatter}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to