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
assertEquals(
                                String.format(Locale.ROOT, "%s q: %.4f, compression: %.0f, n: %d", k, q, compression, n),
                                k.k(1 - q, compression, n),
                                k.k(1 - q, norm),
                                1e-10
                            );
                        }
                    }
                    
                    double mink = Double.POSITIVE_INFINITY;
                    double maxk = Double.NEGATIVE_INFINITY;
                    double singletons = 0;
                    while (singletons < n / 2.0) {
                        
                        double diff2 = k.k((singletons + 2.0) / n, norm) - k.k(singletons / n, norm);
                        if (diff2 < 1) {
                            
                            double q = singletons / n;
                            mink = Math.min(mink, k.k(q, norm));
                            maxk = Math.max(maxk, k.k(1 - q, norm));
                            break;
                        }
                        singletons++;
                    }
                    
                    if (Double.isInfinite(mink) || Double.isInfinite(maxk)) {
                        
                        assertEquals(n, 2 * singletons, 0);
                        mink = 0;
                        maxk = 0;