Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES|QL] Add date math syntax and autocomplete support (elastic#166058)
## Summary This PR adds support for date math in ES|QL providing an improved autocompleting feature for the `EVAL` command: * ✨ auto close brackets in monaco ![esql_date_math_support_autoclose](https://github.com/elastic/kibana/assets/924948/657a52e5-20ce-46e6-a138-b1f58184db27) * ✨ support date math syntax * ✨ improve EVAL autocomplete in various ways * provide date duration suggestions with single unit after math operations * provide date duration suggestions if quantifier has been declared already * provide math signs based on context ( if `EVAL` is in duration mode just `+`, `-`, otherwise all 4) * provide math commands based on context (if `EVAL` is in duration mode only functions who return a date, otherwise all of them) * provide date duration suggestions only when `EVAL` is in duration mode * provide date duration suggestions as first argument for date supported functions * extended grammar to support also plural versions of duration units ![esql_date_math_support](https://github.com/elastic/kibana/assets/924948/7bf48265-1c47-45ac-a345-2dd320c8e431) ### Checklist Delete any items that are not applicable to this PR. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information