[
https://issues.apache.org/jira/browse/PHOENIX-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14356443#comment-14356443
]
Shuxiong Ye commented on PHOENIX-1715:
--------------------------------------
1. For PFloat and PDouble, they complex some bit operations,
So I just try to convert them to ints and longs, and compare.
2. For PUnsignedFloat and PUnsignedDouble,
2.1 try to determine if it is negative(sign-bit equals 0)
2.2 try to determine if it is zero(convert them to ints and longs, and
compare with pre-compute ZERO)
3. For PDecimal
take details of PDataType#toBigDecimal, byte-base computation
> Implement Build-in math function Sign
> -------------------------------------
>
> Key: PHOENIX-1715
> URL: https://issues.apache.org/jira/browse/PHOENIX-1715
> Project: Phoenix
> Issue Type: Sub-task
> Reporter: Shuxiong Ye
> Assignee: Shuxiong Ye
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)