Skip to content

Commit f63d65b

Browse files
committed
Support depthOffset in MD docs headings for nesting functions
1 parent 72bd227 commit f63d65b

File tree

12 files changed

+53
-42
lines changed

12 files changed

+53
-42
lines changed

docs/reference/query-languages/esql/_snippets/functions/layout/st_xmax.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/st_xmin.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/st_ymax.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/query-languages/esql/_snippets/functions/layout/st_ymin.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
* [`ST_X`](../../functions-operators/spatial-functions.md#esql-st_x)
77
* [`ST_Y`](../../functions-operators/spatial-functions.md#esql-st_y)
88
* [preview] [`ST_ENVELOPE`](../../functions-operators/spatial-functions.md#esql-st_envelope)
9-
* [preview] [`ST_XMAX`](../../functions-operators/spatial-functions.md#esql-st_xmax)
10-
* [preview] [`ST_XMIN`](../../functions-operators/spatial-functions.md#esql-st_xmin)
11-
* [preview] [`ST_YMAX`](../../functions-operators/spatial-functions.md#esql-st_ymax)
12-
* [preview] [`ST_YMIN`](../../functions-operators/spatial-functions.md#esql-st_ymin)
9+
* [preview] [`ST_XMAX`](../../functions-operators/spatial-functions.md#esql-st_xmax)
10+
* [preview] [`ST_XMIN`](../../functions-operators/spatial-functions.md#esql-st_xmin)
11+
* [preview] [`ST_YMAX`](../../functions-operators/spatial-functions.md#esql-st_ymax)
12+
* [preview] [`ST_YMIN`](../../functions-operators/spatial-functions.md#esql-st_ymin)
1313
* [preview] [`ST_GEOTILE`](../../functions-operators/spatial-functions.md#esql-st_geotile)
14+
* [preview] [`ST_GEOTILE_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_string)
15+
* [preview] [`ST_GEOTILE_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_long)
16+
* [preview] [`ST_GEOTILE_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_geoshape)
1417
* [preview] [`ST_GEOHEX`](../../functions-operators/spatial-functions.md#esql-st_geohex)
18+
* [preview] [`ST_GEOHEX_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_string)
19+
* [preview] [`ST_GEOHEX_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_long)
20+
* [preview] [`ST_GEOHEX_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_geoshape)
1521
* [preview] [`ST_GEOHASH`](../../functions-operators/spatial-functions.md#esql-st_geohash)
16-
* [preview] [`ST_GEOTILE_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_string)
17-
* [preview] [`ST_GEOHEX_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_string)
18-
* [preview] [`ST_GEOHASH_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_string)
19-
* [preview] [`ST_GEOTILE_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_long)
20-
* [preview] [`ST_GEOHEX_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_long)
21-
* [preview] [`ST_GEOHASH_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_long)
22-
* [preview] [`ST_GEOTILE_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geotile_to_geoshape)
23-
* [preview] [`ST_GEOHEX_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geohex_to_geoshape)
24-
* [preview] [`ST_GEOHASH_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_geoshape)
22+
* [preview] [`ST_GEOHASH_TO_STRING`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_string)
23+
* [preview] [`ST_GEOHASH_TO_LONG`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_long)
24+
* [preview] [`ST_GEOHASH_TO_GEOSHAPE`](../../functions-operators/spatial-functions.md#esql-st_geohash_to_geoshape)

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,34 @@ mapped_pages:
5151
:::{include} ../_snippets/functions/layout/st_geotile.md
5252
:::
5353

54-
:::{include} ../_snippets/functions/layout/st_geohex.md
54+
:::{include} ../_snippets/functions/layout/st_geotile_to_string.md
5555
:::
5656

57-
:::{include} ../_snippets/functions/layout/st_geohash.md
57+
:::{include} ../_snippets/functions/layout/st_geotile_to_long.md
5858
:::
5959

60-
:::{include} ../_snippets/functions/layout/st_geotile_to_string.md
60+
:::{include} ../_snippets/functions/layout/st_geotile_to_geoshape.md
6161
:::
6262

63-
:::{include} ../_snippets/functions/layout/st_geohex_to_string.md
63+
:::{include} ../_snippets/functions/layout/st_geohex.md
6464
:::
6565

66-
:::{include} ../_snippets/functions/layout/st_geohash_to_string.md
66+
:::{include} ../_snippets/functions/layout/st_geohex_to_string.md
6767
:::
6868

69-
:::{include} ../_snippets/functions/layout/st_geotile_to_long.md
69+
:::{include} ../_snippets/functions/layout/st_geohex_to_long.md
7070
:::
7171

72-
:::{include} ../_snippets/functions/layout/st_geohex_to_long.md
72+
:::{include} ../_snippets/functions/layout/st_geohex_to_geoshape.md
7373
:::
7474

75-
:::{include} ../_snippets/functions/layout/st_geohash_to_long.md
75+
:::{include} ../_snippets/functions/layout/st_geohash.md
7676
:::
7777

78-
:::{include} ../_snippets/functions/layout/st_geotile_to_geoshape.md
78+
:::{include} ../_snippets/functions/layout/st_geohash_to_string.md
7979
:::
8080

81-
:::{include} ../_snippets/functions/layout/st_geohex_to_geoshape.md
81+
:::{include} ../_snippets/functions/layout/st_geohash_to_long.md
8282
:::
8383

8484
:::{include} ../_snippets/functions/layout/st_geohash_to_geoshape.md

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
*/
7171
String appendix() default "";
7272

73+
/**
74+
* The heading depth of this function in the docs, relative to the normal depth of functions.
75+
*/
76+
int depthOffset() default 0;
77+
7378
/**
7479
* The position the function can appear in the language.
7580
*/

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMax.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public class StXMax extends UnaryScalarFunction {
4545
returnType = "double",
4646
description = "Extracts the maximum value of the `x` coordinates from the supplied geometry.\n"
4747
+ "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the maximum `longitude` value.",
48-
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max")
48+
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),
49+
depthOffset = 1 // So this appears as a subsection of ST_ENVELOPE
4950
)
5051
public StXMax(
5152
Source source,

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StXMin.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public class StXMin extends UnaryScalarFunction {
4545
returnType = "double",
4646
description = "Extracts the minimum value of the `x` coordinates from the supplied geometry.\n"
4747
+ "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the minimum `longitude` value.",
48-
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max")
48+
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),
49+
depthOffset = 1 // So this appears as a subsection of ST_ENVELOPE
4950
)
5051
public StXMin(
5152
Source source,

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/scalar/spatial/StYMax.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public class StYMax extends UnaryScalarFunction {
4545
returnType = "double",
4646
description = "Extracts the maximum value of the `y` coordinates from the supplied geometry.\n"
4747
+ "If the geometry is of type `geo_point` or `geo_shape` this is equivalent to extracting the maximum `latitude` value.",
48-
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max")
48+
examples = @Example(file = "spatial_shapes", tag = "st_x_y_min_max"),
49+
depthOffset = 1 // So this appears as a subsection of ST_ENVELOPE
4950
)
5051
public StYMax(
5152
Source source,

0 commit comments

Comments
 (0)