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
}
                    
                    double diff = maxk - mink + 2 * singletons;
                    
                    String label = String.format(
                        Locale.ROOT,
                        "max diff: %.3f, scale: %s, compression: %.0f, n: %d",
                        diff,
                        k,
                        compression,
                        n
                    );
                    assertTrue(label, diff <= Math.min(n, compression / 2 + 10));
                    
                    label = String.format(Locale.ROOT, "min diff: %.3f, scale: %s, compression: %.0f, n: %d", diff, k, compression, n);
                    assertTrue(label, diff >= Math.min(n, compression / 4));
                }
            }
        }
    }
    public void testNonDecreasing() {
        for (ScaleFunction scale : ScaleFunction.values()) {
            for (double compression : new double[] { 20, 50, 100, 200, 500, 1000 }) {
                for (int n : new int[] { 10, 100, 1000, 10000, 100_000, 1_000_000, 10_000_000 }) {
                    double norm = scale.normalizer(compression, n);
                    double last = Double.NEGATIVE_INFINITY;
                    for (double q = -1; q < 2; q += 0.01) {
                        double k1 = scale.k(q, norm);
                        double k2 = scale.k(q, compression, n);
                        String remark = String.format(