Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-4238

Aggregations for double variables handle duplicate keys incorrectly

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Duplicate
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • backend
    • None
    • Not defined

      Context:

      In AbstractGroupByVariable when retrieving results of a report grouped by number variable of type double, we round the bucket key to two decimal places. In certain edge cases, this can lead to duplicate bucket keys.
      Currently (due to changes in OPT-4223), if buckets with duplicate keys exist they are replaced in the result map. Previously, duplicate bucket keys would have resulted in duplicate groupByResults in the result list - both not a good solution.

      Instead, we should either adjust the result retrieval so that when a duplicate key is found, the results are added together or alternatively we could think about adjusting the range aggregation creation so that the bucket key is always exactly the same as the actual start of the bucket range, so that no duplicate buckets exist.

      Hint: this PR comment shows where we currently replace duplicate bucketsĀ https://github.com/camunda/camunda-optimize/pull/2596#discussion_r486260317

      AT:

      • duplicate buckets when aggregating a double number variable are either avoided or handled correctly when retrieving results
      • IT asserts the above mentioned edge case of multiple double variables that result in the same key when rounded

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              helene.waechtler Helene Waechtler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: