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

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

                Author: ASF GitHub Bot
            Created on: 08/Jul/21 07:27
            Start Date: 08/Jul/21 07:27
    Worklog Time Spent: 10m 
      Work Description: adesh-rao commented on a change in pull request #2447:
URL: https://github.com/apache/hive/pull/2447#discussion_r665937887



##########
File path: ql/src/test/results/clientpositive/llap/timestamp_1.q.out
##########
@@ -257,7 +329,7 @@ POSTHOOK: query: select cast(t as double) from timestamp_1 
limit 1
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@timestamp_1
 #### A masked pattern was here ####
-1.2938436611E9
+1.293843661E9

Review comment:
       Yes the precision value is same.
   
   `beeline -u 
"jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181,zk2-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181,zk4-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"
   
   Connecting to 
jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181,zk2-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181,zk4-nikhil.ae4yqb3genuuvaozdfax4l12ud.dx.internal.cloudapp.net:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
   
   Connected to: Apache Hive (version 1.2.1000.2.6.5.3033-1)
   
   Driver: Hive JDBC (version 1.2.1000.2.6.5.3033-1)
   
   Transaction isolation: TRANSACTION_REPEATABLE_READ
   
   Beeline version 1.2.1000.2.6.5.3033-1 by Apache Hive
   
   0: jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdf> select cast(cast('2011-01-01 
01:01:01' as timestamp) as double) ;;
   
   +----------------+--+
   |      _c0       |
   +----------------+--+
   | 1.293843661E9  |
   +----------------+--+
   
   1 row selected (0.452 seconds)
   
   0: jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdf> select cast(cast('2011-01-01 
01:01:01' as timestamp) as float) ;;
   
   +---------------+--+
   |      _c0      |
   +---------------+--+
   | 1.29384371E9  |
   +---------------+--+
   
   1 row selected (0.81 seconds)
   `




-- 
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: 620391)
    Time Spent: 2h 20m  (was: 2h 10m)

> Casting timestamp to numeric data types is incorrect for non-UTC timezones
> --------------------------------------------------------------------------
>
>                 Key: HIVE-25299
>                 URL: https://issues.apache.org/jira/browse/HIVE-25299
>             Project: Hive
>          Issue Type: Bug
>          Components: UDF
>    Affects Versions: 3.1.2, 4.0.0
>            Reporter: Adesh Kumar Rao
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> *Hive 1.2.1*
> {noformat}
> Connected to: Apache Hive (version 1.2.1000.2.6.5.3033-1)
> Driver: Hive JDBC (version 1.2.1000.2.6.5.3033-1)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Beeline version 1.2.1000.2.6.5.3033-1 by Apache Hive
> 0: jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdf> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as int);
> +-------------+--+
> |     _c0     |
> +-------------+--+
> | 1615658400  |
> +-------------+--+
> 1 row selected (0.387 seconds)
> 0: jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdf> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as bigint);
> +-------------+--+
> |     _c0     |
> +-------------+--+
> | 1615658400  |
> +-------------+--+
> 1 row selected (0.369 seconds)
> 0: jdbc:hive2://zk0-nikhil.ae4yqb3genuuvaozdf> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as double);
> +--------------+--+
> |     _c0      |
> +--------------+--+
> | 1.6156584E9  |
> +--------------+--+
> {noformat}
> *Hive 3.1, 4.0*
> {noformat}
> Connected to: Apache Hive (version 3.1.0.3.1.6.1-6)
> Driver: Hive JDBC (version 3.1.4.4.1.4.8)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Beeline version 3.1.4.4.1.4.8 by Apache Hive
> 0: jdbc:hive2://zk0-nikhil.usmltwlt0ncuxmbost> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as int);
> +-------------+
> |     _c0     |
> +-------------+
> | 1615683600  |
> +-------------+
> 1 row selected (0.666 seconds)
> 0: jdbc:hive2://zk0-nikhil.usmltwlt0ncuxmbost> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as bigint);
> +-------------+
> |     _c0     |
> +-------------+
> | 1615683600  |
> +-------------+
> 1 row selected (0.536 seconds)
> 0: jdbc:hive2://zk0-nikhil.usmltwlt0ncuxmbost> select cast ( cast 
> ("2021-03-14 01:00:00" as timestamp) as double);
> +--------------+
> |     _c0      |
> +--------------+
> | 1.6156836E9  |
> +--------------+
> 1 row selected (0.696 seconds)
> {noformat}
>  
> The issue occurs for non-UTC timezone (VM timezone is set to 'Asia/Bangkok').



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

Reply via email to