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

James Taylor commented on PHOENIX-2019:
---------------------------------------

I'd recommend using your JavaMathOneArgumentFunction base class for all these. 
Just remove the implementation of getOrderPreserving there and include that 
instead directly in the built-in function implementation class where it's the 
case.

Also, there's really no advantage to preserving the sort order in these 
functions (i.e. same feedback I gave you for SQRT). Just don't call coerceBytes 
in the evaluate method and don't specialize the getSortOrder method.

> Implement Build-in math function ln and log
> -------------------------------------------
>
>                 Key: PHOENIX-2019
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2019
>             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-2019-Implement-Build-in-math-function-ln-and.patch
>
>
> Implement math build-in function, ln and log. Example show as below:
> ln(dp)        natural logarithm       ln(2.0) 0.693147180559945
> log(dp)       base 10 logarithm       log(100.0)      2
> log(b, x)     numeric logarithm to base b     log(2.0, 64.0)  6.0000000000



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

Reply via email to