diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/functions.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/functions.test.ts index 9cf211315757e..85a6fadcc8f5c 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/functions.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/__tests__/functions.test.ts @@ -260,7 +260,7 @@ describe('function validation', () => { // date await expectErrors('FROM a_index | EVAL TEST(NOW())', []); await expectErrors('FROM a_index | EVAL TEST(1.)', [ - 'Argument of [test] must be [date], found value [1] type [decimal]', + 'Argument of [test] must be [date], found value [1.] type [decimal]', ]); }); }); diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts index 23508eeedd234..2790a8a14a3b1 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts @@ -112,7 +112,7 @@ function validateFunctionLiteralArg( values: { name: astFunction.name, argType: argDef.type as string, - value: typeof actualArg.value === 'number' ? actualArg.value : String(actualArg.value), + value: actualArg.text, givenType: actualArg.literalType, }, locations: actualArg.location,