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

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

                Author: ASF GitHub Bot
            Created on: 20/Aug/21 09:43
            Start Date: 20/Aug/21 09:43
    Worklog Time Spent: 10m 
      Work Description: ashish-kumar-sharma commented on a change in pull 
request #2590:
URL: https://github.com/apache/hive/pull/2590#discussion_r692815168



##########
File path: ql/src/test/queries/clientpositive/vector_unix_timestamp.q
##########
@@ -1,6 +1,6 @@
 
 create table t (d string);
-insert into t values('2020-11-16 22:18:40 UTC');
+insert into t values('2020-11-16 22:18:40');

Review comment:
       Since with introduction of DateTimefomatter we only parse value which 
fall under the pattern "yyyy-MM-dd HH:mm:ss" other then that we just drop. But 
after we have introduce the resolverstyle.strict it will strictly check for the 
pattern "yyyy-MM-dd HH:mm:ss" . Other then that it will fail and return run. 
since in function like unix_timestamp() we can provide the pattern to resolve 
the date/Time. So i have added both the test cases for better understanding.




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


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

    Worklog Id:     (was: 640178)
    Time Spent: 1h 40m  (was: 1.5h)

> unix_timestamp() with string input give wrong result
> ----------------------------------------------------
>
>                 Key: HIVE-25458
>                 URL: https://issues.apache.org/jira/browse/HIVE-25458
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Ashish Sharma
>            Assignee: Ashish Sharma
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Description - 
> unix_timestamp() accept 4 value string/date/timestamp/timestamptz. Out of 
> which date/timestamp/timestamptz use DateTimeFormatter.class where as string 
> type use SimpleDateTimeformatter.class which cause difference is value.
> Example - 
> select from_unixtime(unix_timestamp('1800-11-08 01:53:11'));
> 1800-11-08 01:35:15
> select from_unixtime(unix_timestamp(cast('1800-11-08 01:53:11' as 
> timestamp)));
> 1800-11-08 01:53:11
>   



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

Reply via email to