Skip to content

Commit 17120c0

Browse files
authored
Add workaround in SpatialPushDownGeoPointIT to avoid lucene issue (#112388)
1 parent caa3adf commit 17120c0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ tests:
7171
- class: org.elasticsearch.nativeaccess.VectorSystemPropertyTests
7272
method: testSystemPropertyDisabled
7373
issue: https://github.com/elastic/elasticsearch/issues/110949
74-
- class: org.elasticsearch.xpack.esql.spatial.SpatialPushDownGeoPointIT
75-
method: testPushedDownQueriesSingleValue
76-
issue: https://github.com/elastic/elasticsearch/issues/111084
7774
- class: org.elasticsearch.multi_node.GlobalCheckpointSyncActionIT
7875
issue: https://github.com/elastic/elasticsearch/issues/111124
7976
- class: org.elasticsearch.cluster.PrevalidateShardPathIT

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/spatial/SpatialPushDownGeoPointIT.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,24 @@
77

88
package org.elasticsearch.xpack.esql.spatial;
99

10+
import org.apache.lucene.geo.GeoEncodingUtils;
1011
import org.elasticsearch.geo.GeometryTestUtils;
1112
import org.elasticsearch.geometry.Geometry;
1213

1314
public class SpatialPushDownGeoPointIT extends SpatialPushDownTestCase {
1415

16+
private static final double LAT_MAX_VALUE = GeoEncodingUtils.decodeLatitude(Integer.MAX_VALUE - 3);
17+
1518
@Override
1619
protected String fieldType() {
1720
return "geo_point";
1821
}
1922

2023
@Override
2124
protected Geometry getIndexGeometry() {
22-
return GeometryTestUtils.randomPoint();
25+
// This is to overcome lucene bug https://github.com/apache/lucene/issues/13703.
26+
// Once it is fixed we can remove this workaround.
27+
return randomValueOtherThanMany(p -> p.getLat() >= LAT_MAX_VALUE, GeometryTestUtils::randomPoint);
2328
}
2429

2530
@Override

0 commit comments

Comments
 (0)