Skip to content

Commit d8d58c9

Browse files
committed
Move geo-grid functions out of SNAPSHOT and into tech-preview
1 parent 500c4ff commit d8d58c9

File tree

6 files changed

+33
-9
lines changed

6 files changed

+33
-9
lines changed

docs/reference/query-languages/esql/_snippets/lists/spatial-functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
* [preview] [`ST_XMIN`](../../functions-operators/spatial-functions.md#esql-st_xmin)
1111
* [preview] [`ST_YMAX`](../../functions-operators/spatial-functions.md#esql-st_ymax)
1212
* [preview] [`ST_YMIN`](../../functions-operators/spatial-functions.md#esql-st_ymin)
13+
* [preview] [`ST_GEOTILE`](../../functions-operators/spatial-functions.md#esql-st_geotile)
14+
* [preview] [`ST_GEOHEX`](../../functions-operators/spatial-functions.md#esql-st_geohex)
15+
* [preview] [`ST_GEOHASH`](../../functions-operators/spatial-functions.md#esql-st_geohash)

docs/reference/query-languages/esql/_snippets/lists/type-conversion-functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
* [`TO_DATE_NANOS`](../../functions-operators/type-conversion-functions.md#esql-to_date_nanos)
77
* [`TO_DEGREES`](../../functions-operators/type-conversion-functions.md#esql-to_degrees)
88
* [`TO_DOUBLE`](../../functions-operators/type-conversion-functions.md#esql-to_double)
9+
* [preview] [`TO_GEOHASH`](../../functions-operators/type-conversion-functions.md#esql-to_geohash)
10+
* [preview] [`TO_GEOHEX`](../../functions-operators/type-conversion-functions.md#esql-to_geohex)
911
* [`TO_GEOPOINT`](../../functions-operators/type-conversion-functions.md#esql-to_geopoint)
1012
* [`TO_GEOSHAPE`](../../functions-operators/type-conversion-functions.md#esql-to_geoshape)
13+
* [preview] [`TO_GEOTILE`](../../functions-operators/type-conversion-functions.md#esql-to_geotile)
1114
* [`TO_INTEGER`](../../functions-operators/type-conversion-functions.md#esql-to_integer)
1215
* [`TO_IP`](../../functions-operators/type-conversion-functions.md#esql-to_ip)
1316
* [`TO_LONG`](../../functions-operators/type-conversion-functions.md#esql-to_long)

docs/reference/query-languages/esql/functions-operators/spatial-functions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,12 @@ mapped_pages:
4747

4848
:::{include} ../_snippets/functions/layout/st_ymin.md
4949
:::
50+
51+
:::{include} ../_snippets/functions/layout/st_geotile.md
52+
:::
53+
54+
:::{include} ../_snippets/functions/layout/st_geohex.md
55+
:::
56+
57+
:::{include} ../_snippets/functions/layout/st_geohash.md
58+
:::

docs/reference/query-languages/esql/functions-operators/type-conversion-functions.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,21 @@ mapped_pages:
4343
:::{include} ../_snippets/functions/layout/to_double.md
4444
:::
4545

46+
:::{include} ../_snippets/functions/layout/to_geohash.md
47+
:::
48+
49+
:::{include} ../_snippets/functions/layout/to_geohex.md
50+
:::
51+
4652
:::{include} ../_snippets/functions/layout/to_geopoint.md
4753
:::
4854

4955
:::{include} ../_snippets/functions/layout/to_geoshape.md
5056
:::
5157

58+
:::{include} ../_snippets/functions/layout/to_geotile.md
59+
:::
60+
5261
:::{include} ../_snippets/functions/layout/to_integer.md
5362
:::
5463

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlCapabilities.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,17 +414,17 @@ public enum Cap {
414414
/**
415415
* Support ST_GEOHASH, ST_GEOTILE and ST_GEOHEX functions
416416
*/
417-
SPATIAL_GRID(Build.current().isSnapshot()),
417+
SPATIAL_GRID,
418418

419419
/**
420420
* Support geohash, geotile and geohex data types. Done in #129581
421421
*/
422-
SPATIAL_GRID_TYPES(Build.current().isSnapshot()),
422+
SPATIAL_GRID_TYPES,
423423

424424
/**
425425
* Support geohash, geotile and geohex in ST_INTERSECTS and ST_DISJOINT. Done in #133546
426426
*/
427-
SPATIAL_GRID_INTERSECTS(Build.current().isSnapshot()),
427+
SPATIAL_GRID_INTERSECTS,
428428

429429
/**
430430
* Fix to GROK and DISSECT that allows extracting attributes with the same name as the input

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/EsqlFunctionRegistry.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,9 @@ private static FunctionDefinition[][] functions() {
419419
def(SpatialWithin.class, SpatialWithin::new, "st_within"),
420420
def(StDistance.class, StDistance::new, "st_distance"),
421421
def(StEnvelope.class, StEnvelope::new, "st_envelope"),
422+
def(StGeohash.class, StGeohash::new, "st_geohash"),
423+
def(StGeotile.class, StGeotile::new, "st_geotile"),
424+
def(StGeohex.class, StGeohex::new, "st_geohex"),
422425
def(StXMax.class, StXMax::new, "st_xmax"),
423426
def(StXMin.class, StXMin::new, "st_xmin"),
424427
def(StYMax.class, StYMax::new, "st_ymax"),
@@ -445,6 +448,9 @@ private static FunctionDefinition[][] functions() {
445448
def(ToDateNanos.class, ToDateNanos::new, "to_date_nanos", "to_datenanos"),
446449
def(ToDegrees.class, ToDegrees::new, "to_degrees"),
447450
def(ToDouble.class, ToDouble::new, "to_double", "to_dbl"),
451+
def(ToGeohash.class, ToGeohash::new, "to_geohash"),
452+
def(ToGeotile.class, ToGeotile::new, "to_geotile"),
453+
def(ToGeohex.class, ToGeohex::new, "to_geohex"),
448454
def(ToGeoPoint.class, ToGeoPoint::new, "to_geopoint"),
449455
def(ToGeoShape.class, ToGeoShape::new, "to_geoshape"),
450456
def(ToIp.class, ToIp::new, "to_ip"),
@@ -506,12 +512,6 @@ private static FunctionDefinition[][] snapshotFunctions() {
506512
def(Score.class, uni(Score::new), Score.NAME),
507513
def(Term.class, bi(Term::new), "term"),
508514
def(Knn.class, tri(Knn::new), "knn"),
509-
def(ToGeohash.class, ToGeohash::new, "to_geohash"),
510-
def(ToGeotile.class, ToGeotile::new, "to_geotile"),
511-
def(ToGeohex.class, ToGeohex::new, "to_geohex"),
512-
def(StGeohash.class, StGeohash::new, "st_geohash"),
513-
def(StGeotile.class, StGeotile::new, "st_geotile"),
514-
def(StGeohex.class, StGeohex::new, "st_geohex"),
515515
def(CosineSimilarity.class, CosineSimilarity::new, "v_cosine"),
516516
def(DotProduct.class, DotProduct::new, "v_dot_product"),
517517
def(L1Norm.class, L1Norm::new, "v_l1_norm"),

0 commit comments

Comments
 (0)