[ https://issues.apache.org/jira/browse/PHOENIX-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14355410#comment-14355410 ]
Shuxiong Ye commented on PHOENIX-1715: -------------------------------------- Integer Types byte-based sign function finish, while Float Types are a little complex. A solution for float types will be 1. If sign bit is minus, just return -1 2. Compare the contents with pre-compute-zero-bytes. if they are same, return 0 3. Other case, return 1. I will try it tomorrow. > 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)