kibana/packages/kbn-esql-utils
Kibana Machine b57c9a6559
[8.x] [ES|QL] Update grammars (#196046) (#196320)
# Backport

This will backport the following commits from `main` to `8.x`:
- [[ES|QL] Update grammars
(#196046)](https://github.com/elastic/kibana/pull/196046)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kibana
Machine","email":"42973632+kibanamachine@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-15T13:47:08Z","message":"[ES|QL]
Update grammars (#196046)\n\nThis PR updates the ES|QL grammars (lexer
and parser) to match the\r\nlatest version in
Elasticsearch.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula
Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"bed5c4e9fe0cf5acc2e5b3326ca306134bc18891","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.16.0"],"title":"[ES|QL]
Update
grammars","number":196046,"url":"https://github.com/elastic/kibana/pull/196046","mergeCommit":{"message":"[ES|QL]
Update grammars (#196046)\n\nThis PR updates the ES|QL grammars (lexer
and parser) to match the\r\nlatest version in
Elasticsearch.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula
Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"bed5c4e9fe0cf5acc2e5b3326ca306134bc18891"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196046","number":196046,"mergeCommit":{"message":"[ES|QL]
Update grammars (#196046)\n\nThis PR updates the ES|QL grammars (lexer
and parser) to match the\r\nlatest version in
Elasticsearch.\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula
Kalafateli
<efstratia.kalafateli@elastic.co>","sha":"bed5c4e9fe0cf5acc2e5b3326ca306134bc18891"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2024-10-15 10:54:05 -05:00
..
src [8.x] [ES|QL] Update grammars (#196046) (#196320) 2024-10-15 10:54:05 -05:00
constants.ts Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
index.ts [8.x] [ES|QL] [Discover] Displays the histogram suggestion always for non transformational commands (#195863) (#196074) 2024-10-14 06:38:00 -05:00
jest.config.js Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
kibana.jsonc Move esql code to the new kibana-esql team (#179454) 2024-03-27 07:47:08 +01:00
package.json Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
README.md [One Discover] Add row indicators for log documents (#190676) 2024-09-11 15:11:31 +02:00
tsconfig.json [ES|QL] Enabling the timepicker for indices without the @timestamp field (#184361) 2024-07-17 16:23:16 -07:00

@kbn/esql-utils

This package contains utilities for ES|QL.

  • getESQLAdHocDataview: Use this function to get correctly an adHoc dataview for your query.
  • getIndexPatternFromESQLQuery: Use this to retrieve the index pattern from the from command.
  • getLimitFromESQLQuery: Use this function to get the limit for a given query. The limit can be either set from the limit command or can be a default value set in ES.
  • removeDropCommandsFromESQLQuery: Use this function to remove all the occurences of the drop command from the query.
  • appendToESQLQuery: Use this function to append more pipes in an existing ES|QL query. It adds the additional commands in a new line.
  • appendWhereClauseToESQLQuery: Use this function to append where clause in an existing query.
  • retrieveMetadataColumns: Use this function to get if there is a metadata option in the from command, and retrieve the columns if so