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

Reevaluate size of result/accumulator types of built in sum()+avg() functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      I'd like to propose to enlarge the accumulator and result type. Reason is simply that an integer overflow is likely to occur especially for these "narrow" types. Even just the sum() of just two tinyint of 100 would return -56, which is just wrong.

      Probably like this.

      If we decide to do so, we should do it in 2.2.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              snazy Robert Stupp
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: