Skip to content

[FEATURE] Pushdown any UDAF by scripted metric aggregations #4354

Open

Description

@songkant-aws

Is your feature request related to a problem?
Currently, complex UDAFs like patterns command implement its own logic because OpenSearch core doesn't provide the corresponding aggregator implementation. For those UDAFs, it's not straightforward to pushdown aggregation by composite aggregation for them.

OpenSearch scripted metric aggregation provides a pipeline of multiple mapping to single reduce by multiple scripts. See: https://docs.opensearch.org/latest/aggregations/metric/scripted-metric/

DataNode1: initScript -> mapScript -> combineScript
                                                     \
                                                      \
DataNode2: initScript -> mapScript -> combineScript -> reduceScript -> agg result
                                                      /
                                                     /
DataNode3: initScript -> mapScript -> combineScript

What solution would you like?
A clear and concise description of what you want to happen.

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Activity

  1. changed the title [-][FEATURE] Pushdown any UDAF with scripted metric aggregations[/-] [+][FEATURE] Pushdown any UDAF by scripted metric aggregations[/+] on Sep 23, 2025
  2. songkant-aws commented on Sep 23, 2025

    @songkant-aws
    CollaboratorAuthor

    I can pick this one

  3. added
    PPL
    calcite
    and removed on Sep 23, 2025
  4. added and removed
    enhancement
    on Sep 23, 2025
  5. moved this from Not Started to In progress in PPL Trackeron Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLcalcitefeature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions