elasticsearch/docs/reference/esql/functions/parameters
Craig Taverner 536d614694
ES|QL ST_DISTANCE Function (#108764)
* WIP Started refactoring in preparation for ST_DISTANCE

* Initial evaluators for ST_DISTANCE

* Update docs/changelog/108764.yaml

* Fix invalid changelog generated by CI

* Register function and get unit tests working

* Fixed failing meta function description tests, and refined descriptions

* Added initial CsvTests and calculate Geo differently to Cartesian

* Added more csv-spec tests and changed to arcDistance for accuracy

* Added generated docs files

* Link to generated docs

* Fix examples tag for linking from generated docs

* Skip wrapper function

And note that we might want to include instead some of the related intelligence from Circle2D::HaversineDistance class

* Added ST_DWITHIN and more tests for ST_DISTANCE and ST_DWITHIN

* Code style

* Added more tests, this time for sorting on distance

* Fixes after rebase on main

* The ST_DWITHIN cannot use BinarySpatialFunction because it is ternary

So we moved the common code to a separate SpatialTypeResolver, and made a simpler TernarySpatialFunction based on a simple TernaryScalarFunction. This had additional consequences, simplifying the points-only cases.

The main reason for this change was to support StDWithinTests which need to test a lot of things that involve varying all three input types, generating expected error strings, etc. The original hack of just adding to BinarySpatialFunction worked for the actual integration tests, but clearly did not satisfy all the use cases tested by the unit tests.

We also restricted ST_DWITHIN to take only a double as the third argument, because otherwise the number of evaluators would explode, since we need a separate evaluator for each Block type, and Integer and Double use different block types.

* Fixed function count after rebasing on main

* Update docs/changelog/108764.yaml

* Added generated docs for ST_DWITHIN

* Connect docs for ST_DWITHIN

* Add back issue link

* Remove support for ST_DWITHIN

* Update docs/changelog/108764.yaml

* Bring back link to issue in changelog

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

Co-authored-by: Ignacio Vera <iverase@gmail.com>

* Revert reformatting of function descriptions

We should put this into a separate PR

* Github merged commit with incorrectly formatted whitespace

---------

Co-authored-by: Ignacio Vera <iverase@gmail.com>
2024-06-21 11:59:44 +02:00
..
abs.asciidoc
acos.asciidoc
asin.asciidoc
atan.asciidoc
atan2.asciidoc
bucket.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
case.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
cbrt.asciidoc ESQL: CBRT function (#108574) 2024-05-15 16:50:15 +02:00
ceil.asciidoc
cidr_match.asciidoc [ES|QL] Add/Modify annotations for operators for better doc generation (#108220) 2024-05-03 22:59:51 -04:00
coalesce.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
concat.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
cos.asciidoc
cosh.asciidoc
date_diff.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
date_extract.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
date_format.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
date_parse.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
date_trunc.asciidoc
e.asciidoc
ends_with.asciidoc [ES|QL] Add/Modify annotations for operators for better doc generation (#108220) 2024-05-03 22:59:51 -04:00
floor.asciidoc ESQL: Improve tests and docs for some functions (#107331) 2024-04-11 12:41:56 -04:00
from_base64.asciidoc [ES|QL] Base64 decoding and encoding functions (#107390) 2024-04-15 18:39:26 -04:00
greatest.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
ip_prefix.asciidoc ESQL: Add ip_prefix function (#109070) 2024-05-29 10:23:45 -04:00
least.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
left.asciidoc
length.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
locate.asciidoc
log.asciidoc
log10.asciidoc
ltrim.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
mv_append.asciidoc ES|QL: add MV_APPEND function (#107001) 2024-06-05 03:42:29 +10:00
mv_avg.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_concat.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_count.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_dedupe.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_first.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_last.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_max.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_median.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_min.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_slice.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_sort.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_sum.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
mv_zip.asciidoc mv functions (#107839) 2024-05-01 10:47:22 -04:00
now.asciidoc ES|QL: Add unit tests for now() function (#108498) 2024-05-10 14:28:19 +02:00
pi.asciidoc
pow.asciidoc ESQL: Improve tests and docs for some functions (#107331) 2024-04-11 12:41:56 -04:00
repeat.asciidoc ESQL: add REPEAT string function (#109220) 2024-06-04 16:32:43 -05:00
replace.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
right.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
round.asciidoc ESQL: Improve tests and docs for some functions (#107331) 2024-04-11 12:41:56 -04:00
rtrim.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
signum.asciidoc
sin.asciidoc
sinh.asciidoc
split.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
sqrt.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
st_contains.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
st_disjoint.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
st_distance.asciidoc ES|QL ST_DISTANCE Function (#108764) 2024-06-21 11:59:44 +02:00
st_intersects.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
st_within.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
st_x.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
st_y.asciidoc [ES|QL] Add/Modify annotations for spatial and conditional functions for better doc generation (#107722) 2024-05-10 14:49:25 -04:00
starts_with.asciidoc [ES|QL] Add/Modify annotations for operators for better doc generation (#108220) 2024-05-03 22:59:51 -04:00
substring.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
tan.asciidoc
tanh.asciidoc
tau.asciidoc
to_base64.asciidoc [ES|QL] Base64 decoding and encoding functions (#107390) 2024-04-15 18:39:26 -04:00
to_boolean.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_cartesianpoint.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_cartesianshape.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_datetime.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_degrees.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_double.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_geopoint.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_geoshape.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_integer.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_ip.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_long.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_lower.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_radians.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_string.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_unsigned_long.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_upper.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
to_version.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00
trim.asciidoc [ES|QL] more doc generation via annotations (#107541) 2024-04-22 14:43:36 -04:00