* 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> |
||
---|---|---|
.. | ||
description | ||
examples | ||
kibana | ||
layout | ||
parameters | ||
signature | ||
types | ||
README.md | ||
aggregation-functions.asciidoc | ||
avg.asciidoc | ||
binary.asciidoc | ||
case.asciidoc | ||
cast.asciidoc | ||
conditional-functions-and-expressions.asciidoc | ||
count-distinct.asciidoc | ||
count.asciidoc | ||
date-time-functions.asciidoc | ||
grouping-functions.asciidoc | ||
in.asciidoc | ||
ip-functions.asciidoc | ||
like.asciidoc | ||
logical.asciidoc | ||
math-functions.asciidoc | ||
max.asciidoc | ||
median-absolute-deviation.asciidoc | ||
median.asciidoc | ||
min.asciidoc | ||
mv-functions.asciidoc | ||
operators.asciidoc | ||
percentile.asciidoc | ||
predicates.asciidoc | ||
rlike.asciidoc | ||
round.asciidoc | ||
spatial-functions.asciidoc | ||
st_centroid_agg.asciidoc | ||
string-functions.asciidoc | ||
sum.asciidoc | ||
type-conversion-functions.asciidoc | ||
unary.asciidoc | ||
values.asciidoc |
README.md
The files in these subdirectories are generated by ESQL's test suite:
description
- description of each function scraped from@FunctionInfo#description
examples
- examples of each function scraped from@FunctionInfo#examples
parameters
- description of each function's parameters scraped from@Param
signature
- railroad diagram of the syntax to invoke each functiontypes
- a table of each combination of support type for each parameter. These are generated from tests.layout
- a fully generated description for each functionkibana/definition
- function definitions for kibana's ESQL editorkibana/docs
- the inline docs for kibana
Most functions can use the generated docs generated in the layout
directory.
If we need something more custom for the function we can make a file in this
directory that can include::
any parts of the files above.
To regenerate the files for a function run its tests using gradle:
./gradlew :x-pack:plugin:esql:test -Dtests.class='*SinTests'
To regenerate the files for all functions run all of ESQL's tests using gradle:
./gradlew :x-pack:plugin:esql:test