Skip to content

[ESQL] Aggregations - return null values for individual buckets on errors #110443

@not-napoleon

Description

@not-napoleon

ESQL's design philosophy has been to avoid failing queries on errors as much as possible. Scalars achieve this by trapping (expected) errors and setting their value to null for that row, with a warning. Aggregations, however, do not currently do this. Supporting null + warning for aggs has several steps:

  • Make Source and Warnings objects accessible from within the generated aggregations code
  • Extend the @Aggregator annotation to include a list of exceptions that should be turned into warnings, similar to warnExceptions on the @Evaluator annotation, and update the code generation to catch those warnings in the appropriate place
  • Provide some means for aggregations to mark buckets as null. This probably looks like a bitset column.

That last step will require a change to the Layout. We currently have no capacity for evolving the Layout, which must be the same for all nodes participating in the query. Solving that will likely be the bulk of the work in this ticket.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions