Skip to content

ESQL: Support for String and IP and boolean in the TOP aggregate function #110346

@nik9000

Description

@nik9000

The ESQL aggregate function TOP supports numerics and dates. We'd love to get support for ip, boolean, and keyword/text fields. These are all unique and different.

  • ip fields are a fixed length string type. We could use exactly the same technique to support ip.
  • boolean fields are single bit fields and their sorting is funky. In this case I think having a small a small counter for the number of falses and the number of trues you've seen is probably fine. That's kind of how VALUES works for booleans - though it deduplicates so instead of a counter it's just two boolean values.
  • text/keyword fields have a variable length. They are super useful to support, but they are probably the most difficult. Maybe we'd store "ordinal" values in the min heap and we'd use a side car structure to assign ordinals. Or something. ESQL: TOP support for strings #113183

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions