Repository navigation
Extend LAST and LATEST to support the same field types as FIRST and EARLIEST - #152154
Conversation
🔍 Preview links for changed docs⏳ Building and deploying preview... View progress This comment will be updated with preview links when the build is complete. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
|
Hi @lefteris-z, I've created a changelog YAML for you. |
|
Hi @lefteris-z, I've updated the changelog YAML for you. |
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Extends the ESQL
LASTandLATESTaggregate functions to accept the same field types asFIRSTandEARLIEST.Since
LATESTis a surrogate forLAST(field, @timestamp), both should be brought to parity.The simple-reuse types introduce no new aggregators they wire to the
BytesReforLongsuppliers that already existed forLAST. For the most complex types:dense_vector: values are stored as multi-valued FloatBlock positions. The existing Float aggregator suppliers already handle this layout correctly.exponential_histogramandtdigestrequired new aggregators. The Any* suppliers (introduced in Extend FIRST and EARLIEST to support dense_vector, exponential_histogram and tdigest #149716) are reused for the NULL path, the long suppliers are renamed from their *ByTimestamp originals, the by-int suppliers are new.Extras
LAST/LATEST.FIRST/EARLIESTalready supported flattened but were missing the@FunctionInfodeclaration, this PR adds that to keep things consistent.stats_first_last.csv-specandstats_earliest_latest.csv-spec.Follows on from #149307 and #149716 which added these types to FIRST/EARLIEST
Closes #149478