You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Liudmila Kornilova (JIRA)" <ji...@apache.org> on 2019/08/08 10:44:00 UTC

[jira] [Updated] (CASSANDRA-15232) Arithmetic operators over decimal truncate results

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

Liudmila Kornilova updated CASSANDRA-15232:
-------------------------------------------
    Test and Documentation Plan: I did not run tests except OperationFctsTest
                         Status: Patch Available  (was: In Progress)

> Arithmetic operators over decimal truncate results
> --------------------------------------------------
>
>                 Key: CASSANDRA-15232
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15232
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Semantics
>            Reporter: Benedict
>            Assignee: Liudmila Kornilova
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 4.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The decimal operators hard-code a 128 bit precision for their computations.  Probably a precision needs to be configured or decided somehow, but it’s not clear why 128bit was chosen.  Particularly for multiplication and addition, it’s very unclear why we truncate, which is different to our behaviour for e.g. sum() aggregates.  Probably for division we should also ensure that we do not reduce the precision of the two operands.  A minimum of decimal128 seems reasonable, but a maximum does not.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org