Closed
Description
openedon Feb 20, 2024
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 argumentcase( field _here_)
suggest comparison operators at this point to converge to a booleancase( field > _here_)
suggest field/function of the same type of the right hand side to complete the boolean expressioncase( field > 0, _here_)
business as usual...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment