-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ES|QL Support for ST_GEOHASH, ST_GEOTILE and ST_GEOHEX #125143
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
base: main
Are you sure you want to change the base?
Conversation
e3b2faf
to
5c3d0ee
Compare
5c3d0ee
to
2e7e642
Compare
} | ||
|
||
protected static BytesRef calculateGeotile(Point point, int precision, Rectangle bounds) { | ||
// For points, filtering the point is as good as filtering the tile |
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.
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.
I agree. The current code was a quick-and dirty placeholder for the draft PR. I'll definitely switch over to the better code you suggest.
2e7e642
to
afd6a94
Compare
bcd5ec4
to
9f851d1
Compare
I was trying queries like:
In case of geohex and geotile we provide a good error although looking into the stack trace it feels to me that we are not checking the input while parsing and we only fail when trying to apply the function to the point. More over, for geohash it does not throw an error. Let's improve the checking of input parameters. |
9f851d1
to
e362e57
Compare
a0dc20e
to
899ba0d
Compare
daa800e
to
72bd227
Compare
eadd44d
to
ff82ace
Compare
This is because we want to move the ST_GEOXXX functions to produce longs only, for performance reasons, and need the convenience functions to display these either as strings or as actual shapes. This is both useful to the users, as well as easier to do manual tests where we visualize the results on a map.
This involved copying the H3 utils from spatial plugin to esql. We should rather find a common location or dependency for these.
…support for geo_point bounds
ff82ace
to
5dde316
Compare
In support of the feature request at #123903
Checklist:
GeoTileBoundedPredicate
for correctgeotile
bounds filteringGeohashBoundedPredicate
for correctgeohash
bounds filteringGeoHexCellIdSource.GeoHexPredicate
andH3SphericalUtil
classes into esql module and use them for correct H3 bounds filteringlong
grid-ids instead ofkeyword
for performance and add new functions forkeyword
alternativeslong
andkeyword
versions of the grid-idsgeo_shape
fields