Skip to content

[ES|QL] Autocomplete should help build expressions as first arg in case rather than simple boolean #177258

Closed

Description

Describe the feature:

The case function supports a boolean value as first argument and right now autocomplete is suggesting only boolean fields or eval functions for it.
While this is formally ok and is consistent with other type suggestions I think that autocomplete boolean logic can be extended in this scenario to suggest ANY field type + builtin comparison operators in order to build a boolean expression.
This is not particularly something new as in the where command something similar has been adopted already for the same reason.

The basic idea is:

  • case( _here_ ) suggest any field/eval function in this position as first argument
  • case( field _here_) suggest comparison operators at this point to converge to a boolean
  • case( field > _here_) suggest field/function of the same type of the right hand side to complete the boolean expression
  • case( field > 0, _here_) business as usual...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Feature:ES|QLES|QL related features in KibanaTeam:ESQLES|QL related features in KibanaenhancementNew value added to drive a business resultimpact:mediumAddressing this issue will have a medium level of impact on the quality/strength of our product.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions