Skip to content
Unverified Commit 08141cf8 authored by Salvatore Campagna's avatar Salvatore Campagna Committed by GitHub
Browse files

fix: nested top metrics sort on keyword field (#85058)

Using a double as a return value works only if the field we are
sorting on is a number. If the field is not a value we can convert
to a double, like a non-numeric keyword, converting it to a number
returns `NaN`. Without this patch, sorting takes place on the bucket
key, if the order field points to a non-numeric value. The additional
bucket key comparator is implicitly added as a tie breaker to avoid
non-deterministic sorting of buckets.

With this change we support sorting using any subclass of SortValue.
This means the bucket key will be used just in case of equal values
on the order field.

Issue: #78506
parent dc8ec425
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment