[
https://issues.apache.org/jira/browse/PHOENIX-1715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14359303#comment-14359303
]
ASF GitHub Bot commented on PHOENIX-1715:
-----------------------------------------
Github user JamesRTaylor commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/45#discussion_r26340049
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/schema/types/PDecimal.java ---
@@ -402,4 +402,25 @@ public String toStringLiteral(Object o, Format
formatter) {
public Object getSampleValue(Integer maxLength, Integer arrayLength) {
return new BigDecimal((Long) PLong.INSTANCE.getSampleValue(maxLength,
arrayLength));
}
+
+ // take details from
org.apache.phoenix.schema.types.PDataType#toBigDecimal(byte[], int, int)
+ @Override
+ public double signum(byte[] bytes, int offset, int length, SortOrder
sortOrder,
--- End diff --
return int here
> 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)