Skip to content

Commit

Permalink
[ES|QL] case only requires two parameters (elastic#179011)
Browse files Browse the repository at this point in the history
## Summary

Part of elastic#177699

We had `case` marked as if it required three parameters when in reality
it only requires two.

<img width="600" alt="Screenshot 2024-03-19 at 4 23 29 PM"
src="https://github.com/elastic/kibana/assets/315764/45f7578a-e6ad-4ba9-b71a-05bb1978a384">

Note: we could consider testing these n-1 cases to prevent this kind of
bug in the future.

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Marta Bondyra <[email protected]>
(cherry picked from commit 28277c2)

# Conflicts:
#	packages/kbn-monaco/src/esql/lib/ast/validation/esql_validation_meta_tests.json
  • Loading branch information
drewdaemon committed Mar 21, 2024
1 parent 371b0a8 commit 4a05a70
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")`,
Expand Down

0 comments on commit 4a05a70

Please sign in to comment.