phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shuxiong Ye (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (PHOENIX-2018) Implement math build-in function SQRT
Date Thu, 04 Jun 2015 06:53:37 GMT

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

Shuxiong Ye edited comment on PHOENIX-2018 at 6/4/15 6:53 AM:
--------------------------------------------------------------

Hi [~jamestaylor], for the third point,

{code:java}
+    @Override
+    public OrderPreserving preservesOrder() {
+        return OrderPreserving.YES;
+    }
{code}

SqrtFunction is OrderPreserving.YES, so its result should be the same as input.
That's why I specialize the getSortOrder() method and coerce the result of Math.sqrt here.

What's more, I add one abstract class, JavaMathOneArgumentFunction, as base class for all
one-argument math build-in function.


was (Author: shuxi0ng):
{code:java}
+    @Override
+    public OrderPreserving preservesOrder() {
+        return OrderPreserving.YES;
+    }
{code}

SqrtFunction is OrderPreserving.YES, so its result should be the same as input.
That's why I specialize the getSortOrder() method and coerce the result of Math.sqrt here.

> 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_v3.patch
>
>
> # SQRT means square root.
> # Return type will be PDouble
> # OrderPreserving



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

Mime
View raw message