Skip to content

EQL: Remove pattern == "wild*card" #62651

Closed
@costin

Description

@costin

Currently EQL supports the following pattern for doing wildcard comparisons:
field == "wild*card" which translates to wildcard(field, "wild*card").
That is making a comparison (== or !=) to a string that contains * translates to a wildcard check.

This is convenient however it has a few side-effects:

  1. one cannot make a comparison to a string containing *.
  2. the comparison/wildcard inherits the semantics of equals such as case-insensitivity.
  3. makes it hard to reason whether an expression is string equality or wildcard comparison:
    foo == concat("wild", "*", "card")
  4. for more than one pattern, the pattern ends up being more verbose:
    foo == "wild*" or foo == "*card" vs wildcard(foo, "wild*", "*card")

It would be good to get some numbers to see how often this pattern is being used.
My proposal is to deprecate/remove this syntactic sugar and promote explicit use of wildcard for clear semantics and clarity in intent.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions