mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-29 01:44:36 -04:00
This adds support for `LOOKUP`, a command that implements a sort of inline `ENRICH`, using data that is passed in the request: ``` $ curl -uelastic:password -HContent-Type:application/json -XPOST \ 'localhost:9200/_query?error_trace&pretty&format=txt' \ -d'{ "query": "ROW a=1::LONG | LOOKUP t ON a", "tables": { "t": { "a:long": [ 1, 4, 2], "v1:integer": [ 10, 11, 12], "v2:keyword": ["cat", "dog", "wow"] } }, "version": "2024.04.01" }' v1 | v2 | a ---------------+---------------+--------------- 10 |cat |1 ``` This required these PRs: * #107624 * #107634 * #107701 * #107762 * #107923 * #107894 * #107982 * #108012 * #108020 * #108169 * #108191 * #108334 * #108482 * #108696 * #109040 * #109045 Closes #107306 |
||
---|---|---|
.. | ||
description | ||
examples | ||
kibana | ||
layout | ||
parameters | ||
signature | ||
types | ||
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 | ||
README.md | ||
rlike.asciidoc | ||
round.asciidoc | ||
spatial-functions.asciidoc | ||
st_centroid_agg.asciidoc | ||
string-functions.asciidoc | ||
sum.asciidoc | ||
type-conversion-functions.asciidoc | ||
unary.asciidoc | ||
values.asciidoc |
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