[ES|QL] add time unit abbreviations (#186424)

## Summary

Close https://github.com/elastic/kibana/issues/186413

<img width="303" alt="Screenshot 2024-06-18 at 1 35 52 PM"
src="92d10866-dc46-4c0f-b6d9-e4aa09e0c9c9">

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
This commit is contained in:
Drew Tate 2024-06-20 13:12:37 -06:00 committed by GitHub
parent 16bfe577d5
commit 197fde2c17
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1030 additions and 31 deletions

View file

@ -15,7 +15,7 @@ import { statsAggregationFunctionDefinitions } from '../src/definitions/aggs';
import { evalFunctionDefinitions } from '../src/definitions/functions';
import { groupingFunctionDefinitions } from '../src/definitions/grouping';
import { getFunctionSignatures } from '../src/definitions/helpers';
import { chronoLiterals, timeLiterals } from '../src/definitions/literals';
import { timeUnits, chronoLiterals } from '../src/definitions/literals';
import { nonNullable } from '../src/shared/helpers';
import {
SupportedFieldType,
@ -1046,7 +1046,7 @@ function getFieldName(
const literals = {
chrono_literal: chronoLiterals[0].name,
time_literal: timeLiterals[0].name,
time_literal: timeUnits[0],
};
function getLiteralType(typeString: 'chrono_literal' | 'time_literal') {