[
https://issues.apache.org/jira/browse/HIVE-17240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115693#comment-16115693
]
ASF GitHub Bot commented on HIVE-17240:
---------------------------------------
GitHub user wangyum opened a pull request:
https://github.com/apache/hive/pull/221
[HIVE-17240] ACOS(2) and ASIN(2) should be null
see: https://issues.apache.org/jira/browse/HIVE-17240
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wangyum/hive HIVE-17240
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/hive/pull/221.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #221
----
commit fe1afe47e26350ff47424957bd78f06bdfe49533
Author: Yuming Wang <[email protected]>
Date: 2017-08-03T09:47:05Z
acos(2) should be null
commit 630042704cdadaf69a7afe49ffafb3c4af91a3b8
Author: Yuming Wang <[email protected]>
Date: 2017-08-04T05:16:02Z
asin(2) should be null
commit bee3c0eb6630a692093d231a3b7d3f842bfc1144
Author: Yuming Wang <[email protected]>
Date: 2017-08-06T07:29:23Z
Fix test error
----
> function ACOS(2) and ASIN(2) should be null
> -------------------------------------------
>
> Key: HIVE-17240
> URL: https://issues.apache.org/jira/browse/HIVE-17240
> Project: Hive
> Issue Type: Bug
> Components: UDF
> Affects Versions: 1.1.1, 1.2.2, 2.2.0
> Reporter: Yuming Wang
> Assignee: Yuming Wang
> Attachments: HIVE-17240.1.patch, HIVE-17240.2.patch,
> HIVE-17240.3.patch
>
>
> {{acos(2)}} should be null, same as MySQL:
> {code:sql}
> hive> desc function extended acos;
> OK
> acos(x) - returns the arc cosine of x if -1<=x<=1 or NULL otherwise
> Example:
> > SELECT acos(1) FROM src LIMIT 1;
> 0
> > SELECT acos(2) FROM src LIMIT 1;
> NULL
> Time taken: 0.009 seconds, Fetched: 6 row(s)
> hive> select acos(2);
> OK
> NaN
> Time taken: 0.437 seconds, Fetched: 1 row(s)
> {code}
> {code:sql}
> mysql> select acos(2);
> +---------+
> | acos(2) |
> +---------+
> | NULL |
> +---------+
> 1 row in set (0.00 sec)
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)