-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Handle bounds properly when grid tiles crosses the dateline #83348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Hi @iverase, I've created a changelog YAML for you. |
@elasticmachine update branch |
@elasticmachine update branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
private boolean validHash(String hash) { | ||
final Rectangle rectangle = Geohash.toBoundingBox(hash); | ||
final Rectangle rect = Geohash.toBoundingBox(hash); | ||
if (rect.getMaxX() < rect.getMinX()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole thing could really use a drawing in the comments 😄 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There are situation where a grid tile produced by a GeoGridAggregation might cross the dateline. With hex tile is expected but it might happen with geohash as well. In this case, we are not handling properly the tile intersection with the bounds provided by the query.
This PR adds logic to handle those cases in Geohash and Geohex Grid aggregations.
fixes #83299