diff --git a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts index 898c888799cff..46712fed700bd 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts +++ b/packages/kbn-monaco/src/esql/lib/ast/definitions/functions.ts @@ -592,7 +592,7 @@ export const evalFunctionsDefinitions: FunctionDefinition[] = [ { name: 'condition', type: 'boolean' }, { name: 'value', type: 'any' }, ], - minParams: 3, + minParams: 2, returnType: 'any', examples: [ `from index | eval type = case(languages <= 1, "monolingual", languages <= 2, "bilingual", "polyglot")`, diff --git a/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json b/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json index 4da93337bacfc..39d2ccd562c06 100644 --- a/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json +++ b/packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json @@ -563,11 +563,11 @@ "error": false }, { - "query": "row var = case(true, \"a\", \"a\")", + "query": "row var = case(true, \"a\")", "error": false }, { - "query": "row case(true, \"a\", \"a\")", + "query": "row case(true, \"a\")", "error": false }, { @@ -4871,11 +4871,11 @@ "error": true }, { - "query": "from a_index | eval var = case(booleanField, stringField, stringField)", + "query": "from a_index | eval var = case(booleanField, stringField)", "error": false }, { - "query": "from a_index | eval case(booleanField, stringField, stringField)", + "query": "from a_index | eval case(booleanField, stringField)", "error": false }, {