ESQL: Improve syntax for LOOKUP tables#109489
Merged
elasticsearchmachine merged 4 commits intoelastic:mainfrom Jun 11, 2024
Merged
ESQL: Improve syntax for LOOKUP tables#109489elasticsearchmachine merged 4 commits intoelastic:mainfrom
elasticsearchmachine merged 4 commits intoelastic:mainfrom
Conversation
Replace the syntax for `tables` with something a little more natural.
Now it is:
```
$ 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"]}
}
}
}'
v1 | v2 | a
---------------+---------------+---------------
10 |cat |1
```
Collaborator
|
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Collaborator
|
Pinging @elastic/kibana-esql (ES|QL-ui) |
alex-spies
approved these changes
Jun 7, 2024
| path: /_query | ||
| parameters: [] | ||
| capabilities: [lookup_command] | ||
| capabilities: [lookup_command, tables_types] |
Contributor
There was a problem hiding this comment.
Hm, tables_types implies lookup_command, so maybe we can just replace the capability instead of adding to the list?
Member
Author
There was a problem hiding this comment.
I'm not sure if it's clearer to put both or only the latest one.
Member
Author
|
Blocking this behind #109493 |
elasticsearchmachine
pushed a commit
that referenced
this pull request
Jun 20, 2024
Registering `TABLES_TYPES` capability, that was created (but not registered) in #109489 Also using it as a condition for `lookup.csv-spec` tests. These tests failed badly in Serverless multi-cluster due to different output format in two different nodes. Probably (if I got it right) the YAML tests that were using this capability were not running at all. This PR should re-enable them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the syntax for
tableswith something a little more natural.Now it is: