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

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

                Author: ASF GitHub Bot
            Created on: 09/Aug/21 14:56
            Start Date: 09/Aug/21 14:56
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on a change in pull request #2550:
URL: https://github.com/apache/hive/pull/2550#discussion_r685268304



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUnixTime.java
##########
@@ -18,64 +18,53 @@
 
 package org.apache.hadoop.hive.ql.udf.generic;
 
-import java.text.SimpleDateFormat;
+import java.time.Instant;
 import java.time.ZoneId;
-import java.util.Date;
-import java.util.TimeZone;
-import org.apache.commons.lang3.StringUtils;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
 import org.apache.hadoop.hive.common.type.TimestampTZUtil;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.ql.exec.Description;
 import org.apache.hadoop.hive.ql.exec.MapredContext;
 import org.apache.hadoop.hive.ql.exec.UDFArgumentException;
-import org.apache.hadoop.hive.ql.exec.UDFArgumentLengthException;
 import org.apache.hadoop.hive.ql.metadata.HiveException;
 import org.apache.hadoop.hive.ql.session.SessionState;
 import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters;
 import 
org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters.Converter;
 import org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectInspector;
 import 
org.apache.hadoop.hive.serde2.objectinspector.primitive.IntObjectInspector;
 import 
org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
 import 
org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
 import org.apache.hadoop.io.Text;
+import static 
org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveGrouping.STRING_GROUP;
 
 /**
  * GenericUDFFromUnixTime.
  *
  */
 @Description(name = "from_unixtime",
-    value = "_FUNC_(unix_time, format) - returns unix_time in the specified 
format",
+    value = "_FUNC_(unix_time_in_seconds, format) - returns unix_time in the 
specified format",

Review comment:
       It seems, this change and example would bring in change in DESC FUNCTION 
output. Can we keep it same as base code?




-- 
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: gitbox-unsubscr...@hive.apache.org

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


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

    Worklog Id:     (was: 635897)
    Time Spent: 3h 20m  (was: 3h 10m)

>  from_unixtime() does not consider leap seconds
> -----------------------------------------------
>
>                 Key: HIVE-25403
>                 URL: https://issues.apache.org/jira/browse/HIVE-25403
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Sruthi Mooriyathvariam
>            Assignee: Sruthi Mooriyathvariam
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.1.2
>
>         Attachments: image-2021-07-29-14-42-49-806.png
>
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> The Unix_timestamp() considers "leap second" while the from_unixtime is not; 
> which results in to wrong result as below:
> !image-2021-07-29-14-42-49-806.png!



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

Reply via email to