[jira] [Commented] (HIVE-21743) day( ) gives wrong day from the date in Apache Hive 3.1 server

2019-07-25 Thread Adarshdeep Cheema (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-21743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16892845#comment-16892845
 ] 

Adarshdeep Cheema commented on HIVE-21743:
--

This function works fine for all the dates after 1582-10-15 (including)

in 1582 The Roman calendar was changed to the Georgian calendar.

> day( ) gives wrong day from the date in Apache Hive 3.1 server
> --
>
> Key: HIVE-21743
> URL: https://issues.apache.org/jira/browse/HIVE-21743
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 3.0.1
> Environment: Server: Apache Hive 3.1 
> Driver hive-jdbc-3.1.0.3.1.0.0-78
>Reporter: Adarshdeep Cheema
>Priority: Critical
>
> Using Apache Hive 3.1 server 
> Run the following SQL and you will get 3 instead of 1
> SELECT
>  (day( DATE '0001-01-01'))
> FROM
>  `table`
> PLEASE NOTE THIS DOES NOT HAPPEN WITH Apache HIVE 2.1 SERVER 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (HIVE-21743) day( ) gives wrong day from the date in Apache Hive 3.1 server

2019-05-16 Thread Adarshdeep Cheema (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-21743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16841650#comment-16841650
 ] 

Adarshdeep Cheema commented on HIVE-21743:
--

[https://www.tutorialspoint.com/hive/hive_built_in_functions.htm]
This link says


|int|day(string date)|

|It returns the day part of a date or a timestamp string: day("1970-11-01 
00:00:00") = 1, day("1970-11-01") = 1|

> day( ) gives wrong day from the date in Apache Hive 3.1 server
> --
>
> Key: HIVE-21743
> URL: https://issues.apache.org/jira/browse/HIVE-21743
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 3.0.1
> Environment: Server: Apache Hive 3.1 
> Driver hive-jdbc-3.1.0.3.1.0.0-78
>Reporter: Adarshdeep Cheema
>Priority: Critical
>
> Using Apache Hive 3.1 server 
> Run the following SQL and you will get 3 instead of 1
> SELECT
>  (day( DATE '0001-01-01'))
> FROM
>  `table`
> PLEASE NOTE THIS DOES NOT HAPPEN WITH Apache HIVE 2.1 SERVER 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-21743) day( ) gives wrong day from the date in Apache Hive 3.1 server

2019-05-16 Thread Rajkumar Singh (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-21743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16841628#comment-16841628
 ] 

Rajkumar Singh commented on HIVE-21743:
---

with HIVE-12192 hive do all the date/time computation in UTC that might be 
causing the issue here.
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfMonth.java#L119
https://github.com/apache/hive/blob/master/common/src/java/org/apache/hadoop/hive/common/type/Date.java#L120

> day( ) gives wrong day from the date in Apache Hive 3.1 server
> --
>
> Key: HIVE-21743
> URL: https://issues.apache.org/jira/browse/HIVE-21743
> Project: Hive
>  Issue Type: Bug
>  Components: Hive
>Affects Versions: 3.0.1
> Environment: Server: Apache Hive 3.1 
> Driver hive-jdbc-3.1.0.3.1.0.0-78
>Reporter: Adarshdeep Cheema
>Priority: Critical
>
> Using Apache Hive 3.1 server 
> Run the following SQL and you will get 3 instead of 1
> SELECT
>  (day( DATE '0001-01-01'))
> FROM
>  `table`
> PLEASE NOTE THIS DOES NOT HAPPEN WITH Apache HIVE 2.1 SERVER 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)