[ 
https://issues.apache.org/jira/browse/PHOENIX-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gabriel Reid resolved PHOENIX-491.
----------------------------------

    Resolution: Fixed

Bulk resolve of closed issues imported from GitHub. This status was reached by 
first re-opening all closed imported issues and then resolving them in bulk.

> Fix handling of lack of scale
> -----------------------------
>
>                 Key: PHOENIX-491
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-491
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: James Taylor
>            Assignee: tonyhuang
>              Labels: bug
>
> We should consistently handle the lack of scale. We currently have both 
> PDataType.NO_SCALE and scale==null which is confusing and hard to manage. 
> There's also the issue of trying to get DECIMAL to behave closer to the way 
> Oracle handles a NUMERIC with no scale defined.
> Proposal:
> * Get rid of PDataType.NO_SCALE. Instead, consistently use a null scale to 
> mean the same thing. Keep the private static PColumnImpl.NO_SCALE purely as a 
> way of handling reading/writing.
> * Modify the protected getScale methods in the ArithmeticExpression hierarchy 
> to use Integer args and return types instead of int. If the rhs or lhs scale 
> is null, return null.
> * Leave the ArithmeticExpression.evaluate methods as is. They basically don't 
> set the BigDecimal scale when the scale is null. Let's see if this operates 
> in the desired way.
> * Modify existing tests so that they pass.
> * Add new tests so that they test this code path more completely.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to