forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ES|QL] Stronger typing for ESQL field interface (elastic#189941)
## Summary The heart of this PR is [this change](https://github.com/elastic/kibana/pull/189941/files#diff-88513481c44d7b2de70ca2f7826c2b1fb1d8bda5b308aab0f8917a42ac2c24b7R11-R94) where I clean up and clarify the various data-type-related types floating around in the engines + [this change](https://github.com/elastic/kibana/pull/189941/files#diff-f48b526b82119bd591cf781262173d7a0233d236ab26496a4c06f5ea9a441561R21) where I add strong typing to the ES|QL field interface. Pretty much everything else is a result of that. For example, strongly typing the fields and test helpers highlighted a bunch of tests that were still using Kibana types instead of Elasticsearch types. So, then those had to be updated. There's more work to do to extend the strong field typing to the rest of the engines, but this got big and I decided to do it piece-meal. Next plans - Extend typing to subroutines in autocomplete and validation engines (e.g. the stuff in `factories.ts`) - Add typing to the [variable interface](https://github.com/elastic/kibana/pull/189941/files#diff-f48b526b82119bd591cf781262173d7a0233d236ab26496a4c06f5ea9a441561R13) - Consider merging `time_literal` and `time_duration` types - "It looks like timespan literals are the way to write a constant time_duration. and time_durations can only be constants at the moment. so they aren't the same, but sure are about the same" - Nik - Consider merging `packages/kbn-esql-validation-autocomplete/src/shared/esql_types.ts` with `packages/kbn-esql-validation-autocomplete/src/definitions/types.ts` in some common place ### Checklist - [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
1 parent
c860846
commit edf5c76
Showing
23 changed files
with
811 additions
and
1,050 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.