Fix #123425 numerical floating point edge case (#127982)

This commit is contained in:
Craig Taverner 2025-05-10 16:37:29 +02:00 committed by GitHub
parent 351e3b8fe4
commit cb1391368b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

View file

@ -134,7 +134,7 @@ public class SpatialEnvelopeVisitorTests extends ESTestCase {
} else {
// Both positive and negative x values exist, we need to decide which way to wrap the bbox
double unwrappedWidth = maxPosX - minNegX;
double wrappedWidth = (180 - minPosX) - (-180 - maxNegX);
double wrappedWidth = 360.0 + maxNegX - minPosX;
if (unwrappedWidth <= wrappedWidth) {
// The smaller bbox is around the front of the planet, no dateline wrapping required
assertRectangleResult(i + ": " + point, result, minNegX, maxPosX, maxY, minY, false);

View file

@ -396,9 +396,6 @@ tests:
- class: org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderIT
method: testSearchWhileRelocating
issue: https://github.com/elastic/elasticsearch/issues/127188
- class: org.elasticsearch.geometry.utils.SpatialEnvelopeVisitorTests
method: testVisitGeoPointsWrapping
issue: https://github.com/elastic/elasticsearch/issues/123425
- class: org.elasticsearch.xpack.remotecluster.CrossClusterEsqlRCS2EnrichUnavailableRemotesIT
method: testEsqlEnrichWithSkipUnavailable
issue: https://github.com/elastic/elasticsearch/issues/127368