Browse Source

Support geohash, geotile and geohex grid types (#129581)

The PR at https://github.com/elastic/elasticsearch/pull/125143 added support for `ST_GEOHASH`, `ST_GEOTILE` and `ST_GEOHEX`. However, since it used `long` as the internal type for the grid id, there was need for many additional functions for converting the `long` to and from `keyword` as well as generating `geo_shape` cell bounds for map display. Each pf these involved many more files (for the functions, their docs and the generated evaluators). With inspiration from PostGIS we decided to take a different direction, and instead use a new internal type for each grid:
* `geohash` for the `ST_GEOHASH` function, created from literal using either `TO_GEOHASH(hash)` or `hash::geohash`
* `geotile` for the `ST_GEOTILE` function, created from literal using either `TO_GEOTILE(tile)` or `tile::geotile`
* `geohex` for the `ST_GEOHEX` function, created from literal using either `TO_GEOHEX(h3)` or `h3::geohex`

This also leads to much stricter type checking as we can no longer use the `long` as a plain `long` in all functions that accept longs, or inadvertently using a geohash in a geotile function. However, the addition of new types involves a lot of boilerplate, especially considering the large number of functions that operate on all types, and need to be informed of the existence of these three new types.
Craig Taverner 1 month ago
parent
commit
f7dd6049d5
100 changed files with 1157 additions and 562 deletions
  1. 5 0
      docs/changelog/129581.yaml
  2. 54 4
      docs/redirects.yml
  3. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/st_geohash.md
  4. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/st_geohex.md
  5. 0 6
      docs/reference/query-languages/esql/_snippets/functions/description/st_geohex_to_string.md
  6. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/st_geotile.md
  7. 0 6
      docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_long.md
  8. 0 6
      docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_string.md
  9. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/to_geohash.md
  10. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/to_geohex.md
  11. 1 1
      docs/reference/query-languages/esql/_snippets/functions/description/to_geotile.md
  12. 2 2
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash.md
  13. 2 2
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex.md
  14. 0 14
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_long.md
  15. 0 14
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_string.md
  16. 2 2
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile.md
  17. 0 14
      docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile_to_string.md
  18. 4 4
      docs/reference/query-languages/esql/_snippets/functions/examples/to_geohash.md
  19. 4 4
      docs/reference/query-languages/esql/_snippets/functions/examples/to_geohex.md
  20. 4 4
      docs/reference/query-languages/esql/_snippets/functions/examples/to_geotile.md
  21. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_long.md
  22. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_string.md
  23. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_long.md
  24. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_string.md
  25. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_long.md
  26. 0 27
      docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_string.md
  27. 27 0
      docs/reference/query-languages/esql/_snippets/functions/layout/to_geohash.md
  28. 27 0
      docs/reference/query-languages/esql/_snippets/functions/layout/to_geohex.md
  29. 27 0
      docs/reference/query-languages/esql/_snippets/functions/layout/to_geotile.md
  30. 0 7
      docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohash_to_string.md
  31. 0 7
      docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_long.md
  32. 0 7
      docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_string.md
  33. 2 2
      docs/reference/query-languages/esql/_snippets/functions/parameters/to_geohash.md
  34. 2 2
      docs/reference/query-languages/esql/_snippets/functions/parameters/to_geohex.md
  35. 2 2
      docs/reference/query-languages/esql/_snippets/functions/parameters/to_geotile.md
  36. 6 0
      docs/reference/query-languages/esql/_snippets/functions/types/case.md
  37. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/coalesce.md
  38. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/count.md
  39. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/count_over_time.md
  40. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_append.md
  41. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_contains.md
  42. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_count.md
  43. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_dedupe.md
  44. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_first.md
  45. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_last.md
  46. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/mv_slice.md
  47. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/sample.md
  48. 2 2
      docs/reference/query-languages/esql/_snippets/functions/types/st_geohash.md
  49. 2 2
      docs/reference/query-languages/esql/_snippets/functions/types/st_geohex.md
  50. 0 9
      docs/reference/query-languages/esql/_snippets/functions/types/st_geohex_to_string.md
  51. 2 2
      docs/reference/query-languages/esql/_snippets/functions/types/st_geotile.md
  52. 0 9
      docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_long.md
  53. 0 9
      docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_string.md
  54. 5 3
      docs/reference/query-languages/esql/_snippets/functions/types/to_geohash.md
  55. 5 3
      docs/reference/query-languages/esql/_snippets/functions/types/to_geohex.md
  56. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/to_geoshape.md
  57. 5 3
      docs/reference/query-languages/esql/_snippets/functions/types/to_geotile.md
  58. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/to_long.md
  59. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/to_string.md
  60. 3 0
      docs/reference/query-languages/esql/_snippets/functions/types/values.md
  61. 3 0
      docs/reference/query-languages/esql/_snippets/operators/types/equals.md
  62. 3 0
      docs/reference/query-languages/esql/_snippets/operators/types/is_not_null.md
  63. 3 0
      docs/reference/query-languages/esql/_snippets/operators/types/is_null.md
  64. 3 0
      docs/reference/query-languages/esql/_snippets/operators/types/not_equals.md
  65. 1 1
      docs/reference/query-languages/esql/images/functions/st_geohash.svg
  66. 0 1
      docs/reference/query-languages/esql/images/functions/st_geohash_to_long.svg
  67. 0 1
      docs/reference/query-languages/esql/images/functions/st_geohash_to_string.svg
  68. 0 1
      docs/reference/query-languages/esql/images/functions/st_geohex_to_long.svg
  69. 0 1
      docs/reference/query-languages/esql/images/functions/st_geohex_to_string.svg
  70. 0 1
      docs/reference/query-languages/esql/images/functions/st_geotile_to_long.svg
  71. 0 1
      docs/reference/query-languages/esql/images/functions/st_geotile_to_string.svg
  72. 1 0
      docs/reference/query-languages/esql/images/functions/to_geohash.svg
  73. 1 0
      docs/reference/query-languages/esql/images/functions/to_geohex.svg
  74. 1 0
      docs/reference/query-languages/esql/images/functions/to_geotile.svg
  75. 126 0
      docs/reference/query-languages/esql/kibana/definition/functions/case.json
  76. 54 0
      docs/reference/query-languages/esql/kibana/definition/functions/coalesce.json
  77. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/count.json
  78. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/count_over_time.json
  79. 54 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_append.json
  80. 54 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_contains.json
  81. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_count.json
  82. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_dedupe.json
  83. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_first.json
  84. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_last.json
  85. 72 0
      docs/reference/query-languages/esql/kibana/definition/functions/mv_slice.json
  86. 54 0
      docs/reference/query-languages/esql/kibana/definition/functions/sample.json
  87. 6 6
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash.json
  88. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_long.json
  89. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_string.json
  90. 4 4
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex.json
  91. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_long.json
  92. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_string.json
  93. 4 4
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile.json
  94. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_long.json
  95. 0 37
      docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_string.json
  96. 61 0
      docs/reference/query-languages/esql/kibana/definition/functions/to_geohash.json
  97. 61 0
      docs/reference/query-languages/esql/kibana/definition/functions/to_geohex.json
  98. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/to_geoshape.json
  99. 61 0
      docs/reference/query-languages/esql/kibana/definition/functions/to_geotile.json
  100. 36 0
      docs/reference/query-languages/esql/kibana/definition/functions/to_long.json

+ 5 - 0
docs/changelog/129581.yaml

@@ -0,0 +1,5 @@
+pr: 129581
+summary: "Support geohash, geotile and geohex grid types"
+area: "ES|QL"
+type: enhancement
+issues: []

+ 54 - 4
docs/redirects.yml

@@ -1,7 +1,7 @@
 redirects:
   # Related to https://github.com/elastic/elasticsearch/pull/130716/
   'reference/query-languages/eql/eql-ex-threat-detection.md': 'docs-content://explore-analyze/query-filter/languages/example-detect-threats-with-eql.md'
-  
+
   # https://github.com/elastic/elasticsearch/pull/131385
   'reference/elasticsearch/rest-apis/retrievers.md':
     to: 'reference/elasticsearch/rest-apis/retrievers.md'
@@ -23,7 +23,7 @@ redirects:
         anchors: {'rule-retriever'}
       - to: 'reference/elasticsearch/rest-apis/retrievers/pinned-retriever.md'
         anchors: {'pinned-retriever'}
-  
+
   # ESQL command redirects - split from aggregate pages to individual pages
   'reference/query-languages/esql/commands/source-commands.md':
     to: 'reference/query-languages/esql/commands/source-commands.md'
@@ -35,7 +35,7 @@ redirects:
         anchors: {'esql-row'}
       - to: 'reference/query-languages/esql/commands/show.md'
         anchors: {'esql-show'}
-  
+
   # Handle old anchor references to esql-commands.md
   'reference/query-languages/esql/esql-commands.md':
     to: 'reference/query-languages/esql/esql-commands.md'
@@ -45,7 +45,7 @@ redirects:
         anchors: {'esql-source-commands'}
       - to: 'reference/query-languages/esql/commands/processing-commands.md'
         anchors: {'esql-processing-commands'}
-  
+
   'reference/query-languages/esql/commands/processing-commands.md':
     to: 'reference/query-languages/esql/commands/processing-commands.md'
     anchors: {} # pass-through unlisted anchors in the `many` ruleset
@@ -98,3 +98,53 @@ redirects:
         anchors: {'query-rescorer'}
       - to: 'reference/elasticsearch/rest-apis/rescore-search-results.md'
         anchors: {'multiple-rescores'}
+
+  # Dummy redirects for deleted snippets to get round a bug in redirects validation
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/description/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/_snippets/functions/types/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geohash_to_string.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geotile_to_string.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geohex_to_string.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geohash_to_long.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geotile_to_long.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/images/functions/st_geohex_to_long.svg': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_string.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_string.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_string.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_long.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_long.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_long.json': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geohash_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geotile_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geohex_to_string.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geohash_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geotile_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'
+  'docs/reference/query-languages/esql/kibana/docs/functions/st_geohex_to_long.md': 'reference/query-languages/esql/esql-functions-operators.md'

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geohash.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Calculates the `geohash` of the supplied geo_point at the specified precision. The result is long encoded. Use [ST_GEOHASH_TO_STRING](#esql-st_geohash_to_string) to convert the result to a string.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geohash_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation.md).
+Calculates the `geohash` of the supplied geo_point at the specified precision. The result is long encoded. Use [TO_STRING](#esql-to_string) to convert the result to a string, [TO_LONG](#esql-to_long) to convert it to a `long`, or [TO_GEOSHAPE](esql-to_geoshape.md) to calculate the `geo_shape` bounding geometry.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geohash_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geohashgrid-aggregation.md).
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geohex.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Calculates the `geohex`, the H3 cell-id, of the supplied geo_point at the specified precision. The result is long encoded. Use [ST_GEOHEX_TO_STRING](#esql-st_geohex_to_string) to convert the result to a string.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geohex_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geohexgrid-aggregation.md).
+Calculates the `geohex`, the H3 cell-id, of the supplied geo_point at the specified precision. The result is long encoded. Use [TO_STRING](#esql-to_string) to convert the result to a string, [TO_LONG](#esql-to_long) to convert it to a `long`, or [TO_GEOSHAPE](esql-to_geoshape.md) to calculate the `geo_shape` bounding geometry.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geohex_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geohexgrid-aggregation.md).
 

+ 0 - 6
docs/reference/query-languages/esql/_snippets/functions/description/st_geohex_to_string.md

@@ -1,6 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Description**
-
-Converts an input value representing a Geohex grid-ID in long format into a string.
-

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geotile.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Calculates the `geotile` of the supplied geo_point at the specified precision. The result is long encoded. Use [ST_GEOTILE_TO_STRING](#esql-st_geotile_to_string) to convert the result to a string.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geotile_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geotilegrid-aggregation.md).
+Calculates the `geotile` of the supplied geo_point at the specified precision. The result is long encoded. Use [TO_STRING](#esql-to_string) to convert the result to a string, [TO_LONG](#esql-to_long) to convert it to a `long`, or [TO_GEOSHAPE](esql-to_geoshape.md) to calculate the `geo_shape` bounding geometry.  These functions are related to the [`geo_grid` query](/reference/query-languages/query-dsl/query-dsl-geo-grid-query.md) and the [`geotile_grid` aggregation](/reference/aggregations/search-aggregations-bucket-geotilegrid-aggregation.md).
 

+ 0 - 6
docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_long.md

@@ -1,6 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Description**
-
-Converts an input value representing a geotile grid-ID in string format into a long.
-

+ 0 - 6
docs/reference/query-languages/esql/_snippets/functions/description/st_geotile_to_string.md

@@ -1,6 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Description**
-
-Converts an input value representing a geotile grid-ID in long format into a string.
-

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geohash_to_string.md → docs/reference/query-languages/esql/_snippets/functions/description/to_geohash.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Converts an input value representing a geohash grid-ID in long format into a string.
+Converts an input value to a `geohash` value. A string will only be successfully converted if it respects the `geohash` format.
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geohash_to_long.md → docs/reference/query-languages/esql/_snippets/functions/description/to_geohex.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Converts an input value representing a geohash grid-ID in string format into a long.
+Converts an input value to a `geohex` value. A string will only be successfully converted if it respects the `geohex` format.
 

+ 1 - 1
docs/reference/query-languages/esql/_snippets/functions/description/st_geohex_to_long.md → docs/reference/query-languages/esql/_snippets/functions/description/to_geotile.md

@@ -2,5 +2,5 @@
 
 **Description**
 
-Converts an input value representing a geohex grid-ID in string format into a long.
+Converts an input value to a `geotile` value. A string will only be successfully converted if it respects the `geotile` format.
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash.md

@@ -6,11 +6,11 @@
 FROM airports
 | EVAL geohash = ST_GEOHASH(location, 1)
 | STATS
-    count = COUNT(*),
+    count = COUNT(geohash),
     centroid = ST_CENTROID_AGG(location)
       BY geohash
 | WHERE count >= 10
-| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)
+| EVAL geohashString = TO_STRING(geohash)
 | KEEP count, centroid, geohashString
 | SORT count DESC, geohashString ASC
 ```

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex.md

@@ -6,11 +6,11 @@
 FROM airports
 | EVAL geohex = ST_GEOHEX(location, 1)
 | STATS
-    count = COUNT(*),
+    count = COUNT(geohex),
     centroid = ST_CENTROID_AGG(location)
       BY geohex
 | WHERE count >= 10
-| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)
+| EVAL geohexString = TO_STRING(geohex)
 | KEEP count, centroid, geohexString
 | SORT count DESC, geohexString ASC
 ```

+ 0 - 14
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_long.md

@@ -1,14 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Example**
-
-```esql
-ROW geohex = "841f059ffffffff"
-| EVAL geohexLong = ST_GEOHEX_TO_LONG(geohex)
-```
-
-| geohex:keyword | geohexLong:long |
-| --- | --- |
-| 841f059ffffffff | 595020895127339007 |
-
-

+ 0 - 14
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohex_to_string.md

@@ -1,14 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Example**
-
-```esql
-ROW geohex = 595020895127339007
-| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)
-```
-
-| geohex:long | geohexString:keyword |
-| --- | --- |
-| 595020895127339007 | 841f059ffffffff |
-
-

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile.md

@@ -6,10 +6,10 @@
 FROM airports
 | EVAL geotile = ST_GEOTILE(location, 2)
 | STATS
-    count = COUNT(*),
+    count = COUNT(geotile),
     centroid = ST_CENTROID_AGG(location)
       BY geotile
-| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)
+| EVAL geotileString = TO_STRING(geotile)
 | SORT count DESC, geotileString ASC
 | KEEP count, centroid, geotileString
 ```

+ 0 - 14
docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile_to_string.md

@@ -1,14 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Example**
-
-```esql
-ROW geotile = 1152921508901814277
-| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)
-```
-
-| geotile:long | geotileString:keyword |
-| --- | --- |
-| 1152921508901814277 | 4/8/5 |
-
-

+ 4 - 4
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash_to_long.md → docs/reference/query-languages/esql/_snippets/functions/examples/to_geohash.md

@@ -3,12 +3,12 @@
 **Example**
 
 ```esql
-ROW geohash = "u3bu"
-| EVAL geohashLong = ST_GEOHASH_TO_LONG(geohash)
+ROW string = "u3bu"
+| EVAL geohash = TO_GEOHASH(string)
 ```
 
-| geohash:keyword | geohashLong:long |
+| string:keyword | geohash:geohash |
 | --- | --- |
-| u3bu | 13686180 |
+| u3bu | u3bu |
 
 

+ 4 - 4
docs/reference/query-languages/esql/_snippets/functions/examples/st_geotile_to_long.md → docs/reference/query-languages/esql/_snippets/functions/examples/to_geohex.md

@@ -3,12 +3,12 @@
 **Example**
 
 ```esql
-ROW geotile = "4/8/5"
-| EVAL geotileLong = ST_GEOTILE_TO_LONG(geotile)
+ROW string = "841f059ffffffff"
+| EVAL geohex = TO_GEOHEX(string)
 ```
 
-| geotile:keyword | geotileLong:long |
+| string:keyword | geohex:geohex |
 | --- | --- |
-| 4/8/5 | 1152921508901814277 |
+| 841f059ffffffff | 841f059ffffffff |
 
 

+ 4 - 4
docs/reference/query-languages/esql/_snippets/functions/examples/st_geohash_to_string.md → docs/reference/query-languages/esql/_snippets/functions/examples/to_geotile.md

@@ -3,12 +3,12 @@
 **Example**
 
 ```esql
-ROW geohash = TO_LONG(13686180)
-| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)
+ROW string = "4/8/5"
+| EVAL geotile = TO_GEOTILE(string)
 ```
 
-| geohash:long | geohashString:keyword |
+| string:keyword | geotile:geotile |
 | --- | --- |
-| 13686180 | u3bu |
+| 4/8/5 | 4/8/5 |
 
 

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_long.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOHASH_TO_LONG` [esql-st_geohash_to_long]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geohash_to_long.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geohash_to_long.md
-:::
-
-:::{include} ../description/st_geohash_to_long.md
-:::
-
-:::{include} ../types/st_geohash_to_long.md
-:::
-
-:::{include} ../examples/st_geohash_to_long.md
-:::

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohash_to_string.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOHASH_TO_STRING` [esql-st_geohash_to_string]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geohash_to_string.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geohash_to_string.md
-:::
-
-:::{include} ../description/st_geohash_to_string.md
-:::
-
-:::{include} ../types/st_geohash_to_string.md
-:::
-
-:::{include} ../examples/st_geohash_to_string.md
-:::

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_long.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOHEX_TO_LONG` [esql-st_geohex_to_long]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geohex_to_long.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geohex_to_long.md
-:::
-
-:::{include} ../description/st_geohex_to_long.md
-:::
-
-:::{include} ../types/st_geohex_to_long.md
-:::
-
-:::{include} ../examples/st_geohex_to_long.md
-:::

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geohex_to_string.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOHEX_TO_STRING` [esql-st_geohex_to_string]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geohex_to_string.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geohex_to_string.md
-:::
-
-:::{include} ../description/st_geohex_to_string.md
-:::
-
-:::{include} ../types/st_geohex_to_string.md
-:::
-
-:::{include} ../examples/st_geohex_to_string.md
-:::

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_long.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOTILE_TO_LONG` [esql-st_geotile_to_long]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geotile_to_long.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geotile_to_long.md
-:::
-
-:::{include} ../description/st_geotile_to_long.md
-:::
-
-:::{include} ../types/st_geotile_to_long.md
-:::
-
-:::{include} ../examples/st_geotile_to_long.md
-:::

+ 0 - 27
docs/reference/query-languages/esql/_snippets/functions/layout/st_geotile_to_string.md

@@ -1,27 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-### `ST_GEOTILE_TO_STRING` [esql-st_geotile_to_string]
-```{applies_to}
-stack: preview
-serverless: preview
-```
-
-**Syntax**
-
-:::{image} ../../../images/functions/st_geotile_to_string.svg
-:alt: Embedded
-:class: text-center
-:::
-
-
-:::{include} ../parameters/st_geotile_to_string.md
-:::
-
-:::{include} ../description/st_geotile_to_string.md
-:::
-
-:::{include} ../types/st_geotile_to_string.md
-:::
-
-:::{include} ../examples/st_geotile_to_string.md
-:::

+ 27 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/to_geohash.md

@@ -0,0 +1,27 @@
+% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
+
+## `TO_GEOHASH` [esql-to_geohash]
+```{applies_to}
+stack: preview
+serverless: preview
+```
+
+**Syntax**
+
+:::{image} ../../../images/functions/to_geohash.svg
+:alt: Embedded
+:class: text-center
+:::
+
+
+:::{include} ../parameters/to_geohash.md
+:::
+
+:::{include} ../description/to_geohash.md
+:::
+
+:::{include} ../types/to_geohash.md
+:::
+
+:::{include} ../examples/to_geohash.md
+:::

+ 27 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/to_geohex.md

@@ -0,0 +1,27 @@
+% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
+
+## `TO_GEOHEX` [esql-to_geohex]
+```{applies_to}
+stack: preview
+serverless: preview
+```
+
+**Syntax**
+
+:::{image} ../../../images/functions/to_geohex.svg
+:alt: Embedded
+:class: text-center
+:::
+
+
+:::{include} ../parameters/to_geohex.md
+:::
+
+:::{include} ../description/to_geohex.md
+:::
+
+:::{include} ../types/to_geohex.md
+:::
+
+:::{include} ../examples/to_geohex.md
+:::

+ 27 - 0
docs/reference/query-languages/esql/_snippets/functions/layout/to_geotile.md

@@ -0,0 +1,27 @@
+% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
+
+## `TO_GEOTILE` [esql-to_geotile]
+```{applies_to}
+stack: preview
+serverless: preview
+```
+
+**Syntax**
+
+:::{image} ../../../images/functions/to_geotile.svg
+:alt: Embedded
+:class: text-center
+:::
+
+
+:::{include} ../parameters/to_geotile.md
+:::
+
+:::{include} ../description/to_geotile.md
+:::
+
+:::{include} ../types/to_geotile.md
+:::
+
+:::{include} ../examples/to_geotile.md
+:::

+ 0 - 7
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohash_to_string.md

@@ -1,7 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Parameters**
-
-`grid_id`
-:   Input geohash grid-id. The input can be a single- or multi-valued column or an expression.
-

+ 0 - 7
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_long.md

@@ -1,7 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Parameters**
-
-`grid_id`
-:   Input geotile grid-id. The input can be a single- or multi-valued column or an expression.
-

+ 0 - 7
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geotile_to_string.md

@@ -1,7 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Parameters**
-
-`grid_id`
-:   Input geotile grid-id. The input can be a single- or multi-valued column or an expression.
-

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohex_to_long.md → docs/reference/query-languages/esql/_snippets/functions/parameters/to_geohash.md

@@ -2,6 +2,6 @@
 
 **Parameters**
 
-`grid_id`
-:   Input geohex grid-id. The input can be a single- or multi-valued column or an expression.
+`field`
+:   Input value. The input can be a single- or multi-valued column or an expression.
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohex_to_string.md → docs/reference/query-languages/esql/_snippets/functions/parameters/to_geohex.md

@@ -2,6 +2,6 @@
 
 **Parameters**
 
-`grid_id`
-:   Input Geohex grid-id. The input can be a single- or multi-valued column or an expression.
+`field`
+:   Input value. The input can be a single- or multi-valued column or an expression.
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/parameters/st_geohash_to_long.md → docs/reference/query-languages/esql/_snippets/functions/parameters/to_geotile.md

@@ -2,6 +2,6 @@
 
 **Parameters**
 
-`grid_id`
-:   Input geohash grid-id. The input can be a single- or multi-valued column or an expression.
+`field`
+:   Input value. The input can be a single- or multi-valued column or an expression.
 

+ 6 - 0
docs/reference/query-languages/esql/_snippets/functions/types/case.md

@@ -20,6 +20,12 @@
 | boolean | geo_point | | geo_point |
 | boolean | geo_shape | geo_shape | geo_shape |
 | boolean | geo_shape | | geo_shape |
+| boolean | geohash | geohash | geohash |
+| boolean | geohash | | geohash |
+| boolean | geohex | geohex | geohex |
+| boolean | geohex | | geohex |
+| boolean | geotile | geotile | geotile |
+| boolean | geotile | | geotile |
 | boolean | integer | integer | integer |
 | boolean | integer | | integer |
 | boolean | ip | ip | ip |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/coalesce.md

@@ -12,6 +12,9 @@
 | date_nanos | date_nanos | date_nanos |
 | geo_point | geo_point | geo_point |
 | geo_shape | geo_shape | geo_shape |
+| geohash | geohash | geohash |
+| geohex | geohex | geohex |
+| geotile | geotile | geotile |
 | integer | integer | integer |
 | integer | | integer |
 | ip | ip | ip |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/count.md

@@ -12,6 +12,9 @@
 | double | long |
 | geo_point | long |
 | geo_shape | long |
+| geohash | long |
+| geohex | long |
+| geotile | long |
 | integer | long |
 | ip | long |
 | keyword | long |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/count_over_time.md

@@ -12,6 +12,9 @@
 | double | long |
 | geo_point | long |
 | geo_shape | long |
+| geohash | long |
+| geohex | long |
+| geotile | long |
 | integer | long |
 | ip | long |
 | keyword | long |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_append.md

@@ -12,6 +12,9 @@
 | double | double | double |
 | geo_point | geo_point | geo_point |
 | geo_shape | geo_shape | geo_shape |
+| geohash | geohash | geohash |
+| geohex | geohex | geohex |
+| geotile | geotile | geotile |
 | integer | integer | integer |
 | ip | ip | ip |
 | keyword | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_contains.md

@@ -12,6 +12,9 @@
 | double | double | boolean |
 | geo_point | geo_point | boolean |
 | geo_shape | geo_shape | boolean |
+| geohash | geohash | boolean |
+| geohex | geohex | boolean |
+| geotile | geotile | boolean |
 | integer | integer | boolean |
 | ip | ip | boolean |
 | keyword | keyword | boolean |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_count.md

@@ -12,6 +12,9 @@
 | double | integer |
 | geo_point | integer |
 | geo_shape | integer |
+| geohash | integer |
+| geohex | integer |
+| geotile | integer |
 | integer | integer |
 | ip | integer |
 | keyword | integer |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_dedupe.md

@@ -12,6 +12,9 @@
 | double | double |
 | geo_point | geo_point |
 | geo_shape | geo_shape |
+| geohash | geohash |
+| geohex | geohex |
+| geotile | geotile |
 | integer | integer |
 | ip | ip |
 | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_first.md

@@ -12,6 +12,9 @@
 | double | double |
 | geo_point | geo_point |
 | geo_shape | geo_shape |
+| geohash | geohash |
+| geohex | geohex |
+| geotile | geotile |
 | integer | integer |
 | ip | ip |
 | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_last.md

@@ -12,6 +12,9 @@
 | double | double |
 | geo_point | geo_point |
 | geo_shape | geo_shape |
+| geohash | geohash |
+| geohex | geohex |
+| geotile | geotile |
 | integer | integer |
 | ip | ip |
 | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/mv_slice.md

@@ -12,6 +12,9 @@
 | double | integer | integer | double |
 | geo_point | integer | integer | geo_point |
 | geo_shape | integer | integer | geo_shape |
+| geohash | integer | integer | geohash |
+| geohex | integer | integer | geohex |
+| geotile | integer | integer | geotile |
 | integer | integer | integer | integer |
 | ip | integer | integer | ip |
 | keyword | integer | integer | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/sample.md

@@ -12,6 +12,9 @@
 | double | integer | double |
 | geo_point | integer | geo_point |
 | geo_shape | integer | geo_shape |
+| geohash | integer | geohash |
+| geohex | integer | geohex |
+| geotile | integer | geotile |
 | integer | integer | integer |
 | ip | integer | ip |
 | keyword | integer | keyword |

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/types/st_geohash.md

@@ -4,6 +4,6 @@
 
 | geometry | precision | bounds | result |
 | --- | --- | --- | --- |
-| geo_point | integer | geo_shape | long |
-| geo_point | integer | | long |
+| geo_point | integer | geo_shape | geohash |
+| geo_point | integer | | geohash |
 

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/types/st_geohex.md

@@ -4,6 +4,6 @@
 
 | geometry | precision | bounds | result |
 | --- | --- | --- | --- |
-| geo_point | integer | geo_shape | long |
-| geo_point | integer | | long |
+| geo_point | integer | geo_shape | geohex |
+| geo_point | integer | | geohex |
 

+ 0 - 9
docs/reference/query-languages/esql/_snippets/functions/types/st_geohex_to_string.md

@@ -1,9 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Supported types**
-
-| grid_id | result |
-| --- | --- |
-| keyword | keyword |
-| long | keyword |
-

+ 2 - 2
docs/reference/query-languages/esql/_snippets/functions/types/st_geotile.md

@@ -4,6 +4,6 @@
 
 | geometry | precision | bounds | result |
 | --- | --- | --- | --- |
-| geo_point | integer | geo_shape | long |
-| geo_point | integer | | long |
+| geo_point | integer | geo_shape | geotile |
+| geo_point | integer | | geotile |
 

+ 0 - 9
docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_long.md

@@ -1,9 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Supported types**
-
-| grid_id | result |
-| --- | --- |
-| keyword | long |
-| long | long |
-

+ 0 - 9
docs/reference/query-languages/esql/_snippets/functions/types/st_geotile_to_string.md

@@ -1,9 +0,0 @@
-% This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.
-
-**Supported types**
-
-| grid_id | result |
-| --- | --- |
-| keyword | keyword |
-| long | keyword |
-

+ 5 - 3
docs/reference/query-languages/esql/_snippets/functions/types/st_geohash_to_string.md → docs/reference/query-languages/esql/_snippets/functions/types/to_geohash.md

@@ -2,8 +2,10 @@
 
 **Supported types**
 
-| grid_id | result |
+| field | result |
 | --- | --- |
-| keyword | keyword |
-| long | keyword |
+| geohash | geohash |
+| keyword | geohash |
+| long | geohash |
+| text | geohash |
 

+ 5 - 3
docs/reference/query-languages/esql/_snippets/functions/types/st_geohash_to_long.md → docs/reference/query-languages/esql/_snippets/functions/types/to_geohex.md

@@ -2,8 +2,10 @@
 
 **Supported types**
 
-| grid_id | result |
+| field | result |
 | --- | --- |
-| keyword | long |
-| long | long |
+| geohex | geohex |
+| keyword | geohex |
+| long | geohex |
+| text | geohex |
 

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/to_geoshape.md

@@ -6,6 +6,9 @@
 | --- | --- |
 | geo_point | geo_shape |
 | geo_shape | geo_shape |
+| geohash | geo_shape |
+| geohex | geo_shape |
+| geotile | geo_shape |
 | keyword | geo_shape |
 | text | geo_shape |
 

+ 5 - 3
docs/reference/query-languages/esql/_snippets/functions/types/st_geohex_to_long.md → docs/reference/query-languages/esql/_snippets/functions/types/to_geotile.md

@@ -2,8 +2,10 @@
 
 **Supported types**
 
-| grid_id | result |
+| field | result |
 | --- | --- |
-| keyword | long |
-| long | long |
+| geotile | geotile |
+| keyword | geotile |
+| long | geotile |
+| text | geotile |
 

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/to_long.md

@@ -10,6 +10,9 @@
 | date | long |
 | date_nanos | long |
 | double | long |
+| geohash | long |
+| geohex | long |
+| geotile | long |
 | integer | long |
 | keyword | long |
 | long | long |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/to_string.md

@@ -12,6 +12,9 @@
 | double | keyword |
 | geo_point | keyword |
 | geo_shape | keyword |
+| geohash | keyword |
+| geohex | keyword |
+| geotile | keyword |
 | integer | keyword |
 | ip | keyword |
 | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/functions/types/values.md

@@ -12,6 +12,9 @@
 | double | double |
 | geo_point | geo_point |
 | geo_shape | geo_shape |
+| geohash | geohash |
+| geohex | geohex |
+| geotile | geotile |
 | integer | integer |
 | ip | ip |
 | keyword | keyword |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/operators/types/equals.md

@@ -16,6 +16,9 @@
 | double | long | boolean |
 | geo_point | geo_point | boolean |
 | geo_shape | geo_shape | boolean |
+| geohash | geohash | boolean |
+| geohex | geohex | boolean |
+| geotile | geotile | boolean |
 | integer | double | boolean |
 | integer | integer | boolean |
 | integer | long | boolean |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/operators/types/is_not_null.md

@@ -15,6 +15,9 @@
 | double | boolean |
 | geo_point | boolean |
 | geo_shape | boolean |
+| geohash | boolean |
+| geohex | boolean |
+| geotile | boolean |
 | integer | boolean |
 | ip | boolean |
 | keyword | boolean |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/operators/types/is_null.md

@@ -15,6 +15,9 @@
 | double | boolean |
 | geo_point | boolean |
 | geo_shape | boolean |
+| geohash | boolean |
+| geohex | boolean |
+| geotile | boolean |
 | integer | boolean |
 | ip | boolean |
 | keyword | boolean |

+ 3 - 0
docs/reference/query-languages/esql/_snippets/operators/types/not_equals.md

@@ -16,6 +16,9 @@
 | double | long | boolean |
 | geo_point | geo_point | boolean |
 | geo_shape | geo_shape | boolean |
+| geohash | geohash | boolean |
+| geohex | geohex | boolean |
+| geotile | geotile | boolean |
 | integer | double | boolean |
 | integer | integer | boolean |
 | integer | long | boolean |

+ 1 - 1
docs/reference/query-languages/esql/images/functions/st_geohash.svg

@@ -1 +1 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="724" height="61" viewbox="0 0 724 61"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m140 0h10m32 0h10m116 0h10m32 0h10m128 0h10m32 0h30m92 0h20m-127 0q5 0 5 5v10q0 5 5 5h102q5 0 5-5v-10q0-5 5-5m5 0h10m32 0h5"/><rect class="s" x="5" y="5" width="140" height="36"/><text class="k" x="15" y="31">ST_GEOHASH</text><rect class="s" x="155" y="5" width="32" height="36" rx="7"/><text class="syn" x="165" y="31">(</text><rect class="s" x="197" y="5" width="116" height="36" rx="7"/><text class="k" x="207" y="31">geometry</text><rect class="s" x="323" y="5" width="32" height="36" rx="7"/><text class="syn" x="333" y="31">,</text><rect class="s" x="365" y="5" width="128" height="36" rx="7"/><text class="k" x="375" y="31">precision</text><rect class="s" x="503" y="5" width="32" height="36" rx="7"/><text class="syn" x="513" y="31">,</text><rect class="s" x="565" y="5" width="92" height="36" rx="7"/><text class="k" x="575" y="31">bounds</text><rect class="s" x="687" y="5" width="32" height="36" rx="7"/><text class="syn" x="697" y="31">)</text></svg>
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="764" height="61" viewbox="0 0 764 61"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m140 0h10m32 0h10m116 0h10m32 0h30m128 0h20m-163 0q5 0 5 5v10q0 5 5 5h138q5 0 5-5v-10q0-5 5-5m5 0h10m32 0h30m92 0h20m-127 0q5 0 5 5v10q0 5 5 5h102q5 0 5-5v-10q0-5 5-5m5 0h10m32 0h5"/><rect class="s" x="5" y="5" width="140" height="36"/><text class="k" x="15" y="31">ST_GEOHASH</text><rect class="s" x="155" y="5" width="32" height="36" rx="7"/><text class="syn" x="165" y="31">(</text><rect class="s" x="197" y="5" width="116" height="36" rx="7"/><text class="k" x="207" y="31">geometry</text><rect class="s" x="323" y="5" width="32" height="36" rx="7"/><text class="syn" x="333" y="31">,</text><rect class="s" x="385" y="5" width="128" height="36" rx="7"/><text class="k" x="395" y="31">precision</text><rect class="s" x="543" y="5" width="32" height="36" rx="7"/><text class="syn" x="553" y="31">,</text><rect class="s" x="605" y="5" width="92" height="36" rx="7"/><text class="k" x="615" y="31">bounds</text><rect class="s" x="727" y="5" width="32" height="36" rx="7"/><text class="syn" x="737" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geohash_to_long.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="444" height="46" viewbox="0 0 444 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m236 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="236" height="36"/><text class="k" x="15" y="31">ST_GEOHASH_TO_LONG</text><rect class="s" x="251" y="5" width="32" height="36" rx="7"/><text class="syn" x="261" y="31">(</text><rect class="s" x="293" y="5" width="104" height="36" rx="7"/><text class="k" x="303" y="31">grid_id</text><rect class="s" x="407" y="5" width="32" height="36" rx="7"/><text class="syn" x="417" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geohash_to_string.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="468" height="46" viewbox="0 0 468 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m260 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="260" height="36"/><text class="k" x="15" y="31">ST_GEOHASH_TO_STRING</text><rect class="s" x="275" y="5" width="32" height="36" rx="7"/><text class="syn" x="285" y="31">(</text><rect class="s" x="317" y="5" width="104" height="36" rx="7"/><text class="k" x="327" y="31">grid_id</text><rect class="s" x="431" y="5" width="32" height="36" rx="7"/><text class="syn" x="441" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geohex_to_long.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="432" height="46" viewbox="0 0 432 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m224 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="224" height="36"/><text class="k" x="15" y="31">ST_GEOHEX_TO_LONG</text><rect class="s" x="239" y="5" width="32" height="36" rx="7"/><text class="syn" x="249" y="31">(</text><rect class="s" x="281" y="5" width="104" height="36" rx="7"/><text class="k" x="291" y="31">grid_id</text><rect class="s" x="395" y="5" width="32" height="36" rx="7"/><text class="syn" x="405" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geohex_to_string.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="456" height="46" viewbox="0 0 456 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m248 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="248" height="36"/><text class="k" x="15" y="31">ST_GEOHEX_TO_STRING</text><rect class="s" x="263" y="5" width="32" height="36" rx="7"/><text class="syn" x="273" y="31">(</text><rect class="s" x="305" y="5" width="104" height="36" rx="7"/><text class="k" x="315" y="31">grid_id</text><rect class="s" x="419" y="5" width="32" height="36" rx="7"/><text class="syn" x="429" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geotile_to_long.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="444" height="46" viewbox="0 0 444 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m236 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="236" height="36"/><text class="k" x="15" y="31">ST_GEOTILE_TO_LONG</text><rect class="s" x="251" y="5" width="32" height="36" rx="7"/><text class="syn" x="261" y="31">(</text><rect class="s" x="293" y="5" width="104" height="36" rx="7"/><text class="k" x="303" y="31">grid_id</text><rect class="s" x="407" y="5" width="32" height="36" rx="7"/><text class="syn" x="417" y="31">)</text></svg>

+ 0 - 1
docs/reference/query-languages/esql/images/functions/st_geotile_to_string.svg

@@ -1 +0,0 @@
-<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="468" height="46" viewbox="0 0 468 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m260 0h10m32 0h10m104 0h10m32 0h5"/><rect class="s" x="5" y="5" width="260" height="36"/><text class="k" x="15" y="31">ST_GEOTILE_TO_STRING</text><rect class="s" x="275" y="5" width="32" height="36" rx="7"/><text class="syn" x="285" y="31">(</text><rect class="s" x="317" y="5" width="104" height="36" rx="7"/><text class="k" x="327" y="31">grid_id</text><rect class="s" x="431" y="5" width="32" height="36" rx="7"/><text class="syn" x="441" y="31">)</text></svg>

+ 1 - 0
docs/reference/query-languages/esql/images/functions/to_geohash.svg

@@ -0,0 +1 @@
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="324" height="46" viewbox="0 0 324 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m140 0h10m32 0h10m80 0h10m32 0h5"/><rect class="s" x="5" y="5" width="140" height="36"/><text class="k" x="15" y="31">TO_GEOHASH</text><rect class="s" x="155" y="5" width="32" height="36" rx="7"/><text class="syn" x="165" y="31">(</text><rect class="s" x="197" y="5" width="80" height="36" rx="7"/><text class="k" x="207" y="31">field</text><rect class="s" x="287" y="5" width="32" height="36" rx="7"/><text class="syn" x="297" y="31">)</text></svg>

+ 1 - 0
docs/reference/query-languages/esql/images/functions/to_geohex.svg

@@ -0,0 +1 @@
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="312" height="46" viewbox="0 0 312 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m128 0h10m32 0h10m80 0h10m32 0h5"/><rect class="s" x="5" y="5" width="128" height="36"/><text class="k" x="15" y="31">TO_GEOHEX</text><rect class="s" x="143" y="5" width="32" height="36" rx="7"/><text class="syn" x="153" y="31">(</text><rect class="s" x="185" y="5" width="80" height="36" rx="7"/><text class="k" x="195" y="31">field</text><rect class="s" x="275" y="5" width="32" height="36" rx="7"/><text class="syn" x="285" y="31">)</text></svg>

+ 1 - 0
docs/reference/query-languages/esql/images/functions/to_geotile.svg

@@ -0,0 +1 @@
+<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="324" height="46" viewbox="0 0 324 46"><defs><style type="text/css">.c{fill:none;stroke:#222222;}.k{fill:#000000;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}.s{fill:#e4f4ff;stroke:#222222;}.syn{fill:#8D8D8D;font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;font-size:20px;}</style></defs><path class="c" d="M0 31h5m140 0h10m32 0h10m80 0h10m32 0h5"/><rect class="s" x="5" y="5" width="140" height="36"/><text class="k" x="15" y="31">TO_GEOTILE</text><rect class="s" x="155" y="5" width="32" height="36" rx="7"/><text class="syn" x="165" y="31">(</text><rect class="s" x="197" y="5" width="80" height="36" rx="7"/><text class="k" x="207" y="31">field</text><rect class="s" x="287" y="5" width="32" height="36" rx="7"/><text class="syn" x="297" y="31">)</text></svg>

+ 126 - 0
docs/reference/query-languages/esql/kibana/definition/functions/case.json

@@ -340,6 +340,132 @@
       "variadic" : true,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        },
+        {
+          "name" : "elseValue",
+          "type" : "geohash",
+          "optional" : true,
+          "description" : "The value that’s returned when no condition evaluates to `true`."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        },
+        {
+          "name" : "elseValue",
+          "type" : "geohex",
+          "optional" : true,
+          "description" : "The value that’s returned when no condition evaluates to `true`."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geotile"
+    },
+    {
+      "params" : [
+        {
+          "name" : "condition",
+          "type" : "boolean",
+          "optional" : false,
+          "description" : "A condition."
+        },
+        {
+          "name" : "trueValue",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "The value that’s returned when the corresponding condition is the first to evaluate to `true`. The default value is returned when no condition matches."
+        },
+        {
+          "name" : "elseValue",
+          "type" : "geotile",
+          "optional" : true,
+          "description" : "The value that’s returned when no condition evaluates to `true`."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 54 - 0
docs/reference/query-languages/esql/kibana/definition/functions/coalesce.json

@@ -142,6 +142,60 @@
       "variadic" : true,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "first",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Expression to evaluate."
+        },
+        {
+          "name" : "rest",
+          "type" : "geohash",
+          "optional" : true,
+          "description" : "Other expression to evaluate."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "first",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Expression to evaluate."
+        },
+        {
+          "name" : "rest",
+          "type" : "geohex",
+          "optional" : true,
+          "description" : "Other expression to evaluate."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "first",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Expression to evaluate."
+        },
+        {
+          "name" : "rest",
+          "type" : "geotile",
+          "optional" : true,
+          "description" : "Other expression to evaluate."
+        }
+      ],
+      "variadic" : true,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/count.json

@@ -100,6 +100,42 @@
       "variadic" : false,
       "returnType" : "long"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : true,
+          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : true,
+          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : true,
+          "description" : "Expression that outputs values to be counted. If omitted, equivalent to `COUNT(*)` (the number of rows)."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/count_over_time.json

@@ -101,6 +101,42 @@
       "variadic" : false,
       "returnType" : "long"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
     {
       "params" : [
         {

+ 54 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_append.json

@@ -148,6 +148,60 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field1",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : ""
+        },
+        {
+          "name" : "field2",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field1",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : ""
+        },
+        {
+          "name" : "field2",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field1",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : ""
+        },
+        {
+          "name" : "field2",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : ""
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 54 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_contains.json

@@ -148,6 +148,60 @@
       "variadic" : false,
       "returnType" : "boolean"
     },
+    {
+      "params" : [
+        {
+          "name" : "superset",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        },
+        {
+          "name" : "subset",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "boolean"
+    },
+    {
+      "params" : [
+        {
+          "name" : "superset",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        },
+        {
+          "name" : "subset",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "boolean"
+    },
+    {
+      "params" : [
+        {
+          "name" : "superset",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        },
+        {
+          "name" : "subset",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "boolean"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_count.json

@@ -100,6 +100,42 @@
       "variadic" : false,
       "returnType" : "integer"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "integer"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "integer"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "integer"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_dedupe.json

@@ -101,6 +101,42 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_first.json

@@ -100,6 +100,42 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_last.json

@@ -100,6 +100,42 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 72 - 0
docs/reference/query-languages/esql/kibana/definition/functions/mv_slice.json

@@ -196,6 +196,78 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Multivalue expression. If `null`, the function returns `null`."
+        },
+        {
+          "name" : "start",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "Start position. If `null`, the function returns `null`. The start argument can be negative. An index of -1 is used to specify the last value in the list."
+        },
+        {
+          "name" : "end",
+          "type" : "integer",
+          "optional" : true,
+          "description" : "End position(included). Optional; if omitted, the position at `start` is returned. The end argument can be negative. An index of -1 is used to specify the last value in the list."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Multivalue expression. If `null`, the function returns `null`."
+        },
+        {
+          "name" : "start",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "Start position. If `null`, the function returns `null`. The start argument can be negative. An index of -1 is used to specify the last value in the list."
+        },
+        {
+          "name" : "end",
+          "type" : "integer",
+          "optional" : true,
+          "description" : "End position(included). Optional; if omitted, the position at `start` is returned. The end argument can be negative. An index of -1 is used to specify the last value in the list."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Multivalue expression. If `null`, the function returns `null`."
+        },
+        {
+          "name" : "start",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "Start position. If `null`, the function returns `null`. The start argument can be negative. An index of -1 is used to specify the last value in the list."
+        },
+        {
+          "name" : "end",
+          "type" : "integer",
+          "optional" : true,
+          "description" : "End position(included). Optional; if omitted, the position at `start` is returned. The end argument can be negative. An index of -1 is used to specify the last value in the list."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 54 - 0
docs/reference/query-languages/esql/kibana/definition/functions/sample.json

@@ -148,6 +148,60 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "The field to collect sample values for."
+        },
+        {
+          "name" : "limit",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "The maximum number of values to collect."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "The field to collect sample values for."
+        },
+        {
+          "name" : "limit",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "The maximum number of values to collect."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "The field to collect sample values for."
+        },
+        {
+          "name" : "limit",
+          "type" : "integer",
+          "optional" : false,
+          "description" : "The maximum number of values to collect."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
     {
       "params" : [
         {

+ 6 - 6
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash.json

@@ -2,7 +2,7 @@
   "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
   "type" : "scalar",
   "name" : "st_geohash",
-  "description" : "Calculates the `geohash` of the supplied geo_point at the specified precision.\nThe result is long encoded. Use ST_GEOHASH_TO_STRING to convert the result to a string.\n\nThese functions are related to the `geo_grid` query\nand the `geohash_grid` aggregation.",
+  "description" : "Calculates the `geohash` of the supplied geo_point at the specified precision.\nThe result is long encoded. Use TO_STRING to convert the result to a string,\nTO_LONG to convert it to a `long`, or TO_GEOSHAPE to calculate\nthe `geo_shape` bounding geometry.\n\nThese functions are related to the `geo_grid` query\nand the `geohash_grid` aggregation.",
   "signatures" : [
     {
       "params" : [
@@ -15,12 +15,12 @@
         {
           "name" : "precision",
           "type" : "integer",
-          "optional" : false,
+          "optional" : true,
           "description" : "Expression of type `integer`. If `null`, the function returns `null`. Valid values are between [1 and 12](https://en.wikipedia.org/wiki/Geohash)."
         }
       ],
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geohash"
     },
     {
       "params" : [
@@ -33,7 +33,7 @@
         {
           "name" : "precision",
           "type" : "integer",
-          "optional" : false,
+          "optional" : true,
           "description" : "Expression of type `integer`. If `null`, the function returns `null`. Valid values are between [1 and 12](https://en.wikipedia.org/wiki/Geohash)."
         },
         {
@@ -44,11 +44,11 @@
         }
       ],
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geohash"
     }
   ],
   "examples" : [
-    "FROM airports\n| EVAL geohash = ST_GEOHASH(location, 1)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohash\n| WHERE count >= 10\n| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)\n| KEEP count, centroid, geohashString\n| SORT count DESC, geohashString ASC"
+    "FROM airports\n| EVAL geohash = ST_GEOHASH(location, 1)\n| STATS\n    count = COUNT(geohash),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohash\n| WHERE count >= 10\n| EVAL geohashString = TO_STRING(geohash)\n| KEEP count, centroid, geohashString\n| SORT count DESC, geohashString ASC"
   ],
   "preview" : true,
   "snapshot_only" : true

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_long.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geohash_to_long",
-  "description" : "Converts an input value representing a geohash grid-ID in string format into a long.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input geohash grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input geohash grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    }
-  ],
-  "examples" : [
-    "ROW geohash = \"u3bu\"\n| EVAL geohashLong = ST_GEOHASH_TO_LONG(geohash)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geohash_to_string.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geohash_to_string",
-  "description" : "Converts an input value representing a geohash grid-ID in long format into a string.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input geohash grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input geohash grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    }
-  ],
-  "examples" : [
-    "ROW geohash = TO_LONG(13686180)\n| EVAL geohashString = ST_GEOHASH_TO_STRING(geohash)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 4 - 4
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex.json

@@ -3,7 +3,7 @@
   "type" : "scalar",
   "name" : "st_geohex",
   "license" : "PLATINUM",
-  "description" : "Calculates the `geohex`, the H3 cell-id, of the supplied geo_point at the specified precision.\nThe result is long encoded. Use ST_GEOHEX_TO_STRING to convert the result to a string.\n\nThese functions are related to the `geo_grid` query\nand the `geohex_grid` aggregation.",
+  "description" : "Calculates the `geohex`, the H3 cell-id, of the supplied geo_point at the specified precision.\nThe result is long encoded. Use TO_STRING to convert the result to a string,\nTO_LONG to convert it to a `long`, or TO_GEOSHAPE to calculate\nthe `geo_shape` bounding geometry.\n\nThese functions are related to the `geo_grid` query\nand the `geohex_grid` aggregation.",
   "signatures" : [
     {
       "params" : [
@@ -22,7 +22,7 @@
       ],
       "license" : "PLATINUM",
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geohex"
     },
     {
       "params" : [
@@ -47,11 +47,11 @@
       ],
       "license" : "PLATINUM",
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geohex"
     }
   ],
   "examples" : [
-    "FROM airports\n| EVAL geohex = ST_GEOHEX(location, 1)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohex\n| WHERE count >= 10\n| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)\n| KEEP count, centroid, geohexString\n| SORT count DESC, geohexString ASC"
+    "FROM airports\n| EVAL geohex = ST_GEOHEX(location, 1)\n| STATS\n    count = COUNT(geohex),\n    centroid = ST_CENTROID_AGG(location)\n      BY geohex\n| WHERE count >= 10\n| EVAL geohexString = TO_STRING(geohex)\n| KEEP count, centroid, geohexString\n| SORT count DESC, geohexString ASC"
   ],
   "preview" : true,
   "snapshot_only" : true

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_long.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geohex_to_long",
-  "description" : "Converts an input value representing a geohex grid-ID in string format into a long.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input geohex grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input geohex grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    }
-  ],
-  "examples" : [
-    "ROW geohex = \"841f059ffffffff\"\n| EVAL geohexLong = ST_GEOHEX_TO_LONG(geohex)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geohex_to_string.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geohex_to_string",
-  "description" : "Converts an input value representing a Geohex grid-ID in long format into a string.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input Geohex grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input Geohex grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    }
-  ],
-  "examples" : [
-    "ROW geohex = 595020895127339007\n| EVAL geohexString = ST_GEOHEX_TO_STRING(geohex)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 4 - 4
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile.json

@@ -2,7 +2,7 @@
   "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
   "type" : "scalar",
   "name" : "st_geotile",
-  "description" : "Calculates the `geotile` of the supplied geo_point at the specified precision.\nThe result is long encoded. Use ST_GEOTILE_TO_STRING to convert the result to a string.\n\nThese functions are related to the `geo_grid` query\nand the `geotile_grid` aggregation.",
+  "description" : "Calculates the `geotile` of the supplied geo_point at the specified precision.\nThe result is long encoded. Use TO_STRING to convert the result to a string,\nTO_LONG to convert it to a `long`, or TO_GEOSHAPE to calculate\nthe `geo_shape` bounding geometry.\n\nThese functions are related to the `geo_grid` query\nand the `geotile_grid` aggregation.",
   "signatures" : [
     {
       "params" : [
@@ -20,7 +20,7 @@
         }
       ],
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geotile"
     },
     {
       "params" : [
@@ -44,11 +44,11 @@
         }
       ],
       "variadic" : false,
-      "returnType" : "long"
+      "returnType" : "geotile"
     }
   ],
   "examples" : [
-    "FROM airports\n| EVAL geotile = ST_GEOTILE(location, 2)\n| STATS\n    count = COUNT(*),\n    centroid = ST_CENTROID_AGG(location)\n      BY geotile\n| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)\n| SORT count DESC, geotileString ASC\n| KEEP count, centroid, geotileString"
+    "FROM airports\n| EVAL geotile = ST_GEOTILE(location, 2)\n| STATS\n    count = COUNT(geotile),\n    centroid = ST_CENTROID_AGG(location)\n      BY geotile\n| EVAL geotileString = TO_STRING(geotile)\n| SORT count DESC, geotileString ASC\n| KEEP count, centroid, geotileString"
   ],
   "preview" : true,
   "snapshot_only" : true

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_long.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geotile_to_long",
-  "description" : "Converts an input value representing a geotile grid-ID in string format into a long.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input geotile grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input geotile grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "long"
-    }
-  ],
-  "examples" : [
-    "ROW geotile = \"4/8/5\"\n| EVAL geotileLong = ST_GEOTILE_TO_LONG(geotile)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 0 - 37
docs/reference/query-languages/esql/kibana/definition/functions/st_geotile_to_string.json

@@ -1,37 +0,0 @@
-{
-  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
-  "type" : "scalar",
-  "name" : "st_geotile_to_string",
-  "description" : "Converts an input value representing a geotile grid-ID in long format into a string.",
-  "signatures" : [
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "keyword",
-          "optional" : false,
-          "description" : "Input geotile grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    },
-    {
-      "params" : [
-        {
-          "name" : "grid_id",
-          "type" : "long",
-          "optional" : false,
-          "description" : "Input geotile grid-id. The input can be a single- or multi-valued column or an expression."
-        }
-      ],
-      "variadic" : false,
-      "returnType" : "keyword"
-    }
-  ],
-  "examples" : [
-    "ROW geotile = 1152921508901814277\n| EVAL geotileString = ST_GEOTILE_TO_STRING(geotile)"
-  ],
-  "preview" : true,
-  "snapshot_only" : true
-}

+ 61 - 0
docs/reference/query-languages/esql/kibana/definition/functions/to_geohash.json

@@ -0,0 +1,61 @@
+{
+  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
+  "type" : "scalar",
+  "name" : "to_geohash",
+  "description" : "Converts an input value to a `geohash` value.\nA string will only be successfully converted if it respects the\n`geohash` format.",
+  "signatures" : [
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "keyword",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "long",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "text",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohash"
+    }
+  ],
+  "examples" : [
+    "ROW string = \"u3bu\"\n| EVAL geohash = TO_GEOHASH(string)"
+  ],
+  "preview" : true,
+  "snapshot_only" : true
+}

+ 61 - 0
docs/reference/query-languages/esql/kibana/definition/functions/to_geohex.json

@@ -0,0 +1,61 @@
+{
+  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
+  "type" : "scalar",
+  "name" : "to_geohex",
+  "description" : "Converts an input value to a `geohex` value.\nA string will only be successfully converted if it respects the\n`geohex` format.",
+  "signatures" : [
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "keyword",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "long",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "text",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geohex"
+    }
+  ],
+  "examples" : [
+    "ROW string = \"841f059ffffffff\"\n| EVAL geohex = TO_GEOHEX(string)"
+  ],
+  "preview" : true,
+  "snapshot_only" : true
+}

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/to_geoshape.json

@@ -28,6 +28,42 @@
       "variadic" : false,
       "returnType" : "geo_shape"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geo_shape"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geo_shape"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geo_shape"
+    },
     {
       "params" : [
         {

+ 61 - 0
docs/reference/query-languages/esql/kibana/definition/functions/to_geotile.json

@@ -0,0 +1,61 @@
+{
+  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
+  "type" : "scalar",
+  "name" : "to_geotile",
+  "description" : "Converts an input value to a `geotile` value.\nA string will only be successfully converted if it respects the\n`geotile` format.",
+  "signatures" : [
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "keyword",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "long",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "text",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "geotile"
+    }
+  ],
+  "examples" : [
+    "ROW string = \"4/8/5\"\n| EVAL geotile = TO_GEOTILE(string)"
+  ],
+  "preview" : true,
+  "snapshot_only" : true
+}

+ 36 - 0
docs/reference/query-languages/esql/kibana/definition/functions/to_long.json

@@ -76,6 +76,42 @@
       "variadic" : false,
       "returnType" : "long"
     },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohash",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geohex",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
+    {
+      "params" : [
+        {
+          "name" : "field",
+          "type" : "geotile",
+          "optional" : false,
+          "description" : "Input value. The input can be a single- or multi-valued column or an expression."
+        }
+      ],
+      "variadic" : false,
+      "returnType" : "long"
+    },
     {
       "params" : [
         {

Some files were not shown because too many files changed in this diff