With the backport of TDigest, the build started failing compiling with Java 20 with the following error:

```
> Task :libs:elasticsearch-tdigest:compileJava FAILED
../elasticsearch/libs/tdigest/src/main/java/org/elasticsearch/tdigest/SortingDigest.java:57: warning: [lossy-conversions] implicit cast from long to int in compound assignment is possibly lossy
            valuesToAddCount += other.size();
                                          ^
error: warnings found and -Werror specified
1 error
1 warning

```
Java 20 is more picky about lossy conversions,

libs/tdigest/src/test/java/org/elasticsearch/tdigest/ScaleFunctionTests.java
int m = 0;
                    for (int i = 0; i < n;) {
                        double cnt = 1;
                        while (i + cnt < n && k.k((i + cnt + 1) / (n - 1), compression, n) - k0 < 1) {
                            cnt++;
                        }
                        double size = n * max(k.max(i / (n - 1), compression, n), k.max((i + cnt) / (n - 1), compression, n));
                        
                        double left = i - (n - 1) / 2;
                        double right = i + cnt - (n - 1) / 2;
                        boolean sameSide = left * right > 0;
                        if (k.toString().endsWith("NO_NORM") == false && sameSide) {
                            assertTrue(
                                String.format(Locale.ROOT, "%s %.0f %.0f %.3f vs %.3f @ %.3f", k, compression, n, cnt, size, i / (n - 1)),
                                cnt == 1 || cnt <= max(1.1 * size, size + 1)
                            );
                        }
                        i += cnt;
                        k0 = k.k(i / (n - 1), compression, n);
                        m++;
                    }
                    clusterCount.put(k.toString(), m);
                    if (k.toString().endsWith("NO_NORM") == false) {
                        assertTrue(
                            String.format(Locale.ROOT, "%s %d, %.0f", k, m, compression),
                            n < 3 * compression || (m >= compression / 3 && m <= compression)
                        );
                    }
                }