Commit graph

5 commits

Author SHA1 Message Date
Iván Cea Fontenla
2233349f76
ESQL: top_list aggregation (#109386)
Added `top_list(<field>, <limit>, <order>)` aggregation, that collect
top N values per bucket. Works with the same types as MAX/MIN.

- Added the aggregation function
- Added a template to generate the aggregators
- Added a template to generate the `<Type>BucketedSort` implementations per-type
  - This structure is based on the `BucketedSort` structure used on the original aggregations. It was modified to better fit the ESQL ecosystem (Blocks based, no docs...)

Also added a guide to create aggregations. Fixes
https://github.com/elastic/elasticsearch/issues/109213
2024-06-20 00:48:45 +10:00
Iván Cea Fontenla
f16f71e2a2
ESQL: Add ip_prefix function (#109070)
Added ESQL function to get the prefix of an IP. It works now with both
IPv4 and IPv6. For users planning to use it with mixed IPs, we may need
to add a function like "is_ipv4()" first.

**About the skipped test:** There's currently a "bug" in the
evaluators//functions that return null. Evaluators can't handle them.
We'll work on support for that in another PR. It affects other
functions, like `substring()`. In this function, however, it only
affects in "wrong" cases (Like an invalid prefix), so it has no impact.

Fixes https://github.com/elastic/elasticsearch/issues/99064
2024-05-29 10:23:45 -04:00
Nik Everett
e4cb2c9f6d
ESQL: Add parsing for a LOOKUP command (#109040)
This command will serve as a sort of "inline" enrich. This commit itself
is mostly antlr generated code and paranoid tests that the new `LOOKUP`
keyword doesn't clash with any variables named `lookup`.

I've also marked our ANTLR generated files as `linguist-generated` which
causes them to be hidden by default in github's UI. You can still click
a button to see them if you like. See
https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
2024-05-28 13:32:30 -04:00
Rory Hunter
d6912ebd59
Assert no carriage returns in release notes test samples (#77238)
The expected output files for the generated changelogs should not contain carriage
returns (`\r`). Their presence was causing test failures on Windows. Fix by setting
the EOL character via `.gitattributes`
2021-09-07 20:45:23 +01:00
Paul Sanwald
3e7fccddaf
Add a CHANGELOG file for release notes. (#29450)
* Add a CHANGELOG file for 7.x release notes.

* update file to include 6.x

* remove confusing comment and small edit to section title

* moving CHANGELOG file under docs directory, as it pertains to release notes.
2018-04-18 07:42:05 -07:00