[ 
https://issues.apache.org/jira/browse/PHOENIX-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566143#comment-14566143
 ] 

Shuxiong Ye commented on PHOENIX-2018:
--------------------------------------

The patch above will firstly turn input to double type, and using 
java.lang.Math related functions to get the result.

Note that, for both types BigDecimal and long, when type cast occurs from these 
two types to double, there will be a loss of precision.

java.lang.Math is only support for double.

> Implement math build-in function SQRT
> -------------------------------------
>
>                 Key: PHOENIX-2018
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2018
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Shuxiong Ye
>            Assignee: Shuxiong Ye
>             Fix For: 5.0.0, 4.5.0, 4.4.1
>
>         Attachments: 
> 0001-PHOENIX-2018-Implement-math-build-in-function-SQRT.patch
>
>
> # SQRT means square root.
> # Return type will be PDouble
> # OrderPreserving



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to