Skip to content

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

@songkant-aws

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLPiped processing languagecalcitecalcite migration releatedfeature

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions