Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15232

Arithmetic operators over decimal truncate results

    XMLWordPrintableJSON

    Details

    • Change Category:
      Semantic
    • Complexity:
      Low Hanging Fruit
    • Platform:
      All
    • Impacts:
      None
    • Test and Documentation Plan:
      Hide

      I did not run tests except OperationFctsTest

      Show
      I did not run tests except OperationFctsTest

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Override Liudmila Kornilova
                Reporter:
                benedict Benedict
                Authors:
                Liudmila Kornilova
                Reviewers:
                Benedict
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h