[
https://issues.apache.org/jira/browse/PHOENIX-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582804#comment-14582804
]
James Taylor commented on PHOENIX-1687:
---------------------------------------
Thanks, [~shuxi0ng]. Looking good. Here's some feedback:
- Can we get rid of these methods, as the default value can be declared in the
annotation (and we wouldn't want to duplicate the default value in a method)?
Also, if you use e notation in the specification of the default, you should end
up with a double value for that argument (not sure if that's an issue in your
case or not). When you declare a default value, Phoenix should pass bind that
argument to the default value when it's not provided.
{code}
+ @Override
+ protected boolean isSecondArgHasDefaultValue() {
+ return true;
+ }
+
+ @Override
+ protected double getSecondArgDefaultValue() {
+ return 10.0;
+ }
+
{code}
- I don't believe you'll want to override this anywhere. Or are you finding
that it's necessary for some reason?
{code}
+ @Override
+ public int getKeyFormationTraversalIndex() {
+ return 0;
+ }
{code}
> Implement missing math built-in POWER function
> ----------------------------------------------
>
> Key: PHOENIX-1687
> URL: https://issues.apache.org/jira/browse/PHOENIX-1687
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Aakarsh Agarwal
> Assignee: Shuxiong Ye
> Labels: gsoc2015, java
> Fix For: 5.0.0, 4.5.0
>
> Attachments: add-function-PHOENIX-1611-1687-2015-2019-2020.patch
>
>
> Take a look at the typical math functions that are implemented in relational
> database systems
> (http://www.postgresql.org/docs/current/static/functions-math.html) and
> implement the same for Phoenix in Java following this guide:
> http://phoenix-hbase.blogspot.com/2013/04/how-to-add-your-own-built-in-function.html
> For this specific task, it is meant to implement missing funstion POWER for
> Phoenix in Java.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)