Skip to content

Conversation

@dwelsch-esi
Copy link
Contributor

Description

Add serial_diff pipeline aggregation.

Issues Resolved

Version

Frontend features

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@github-actions
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@kolchfa-aws
Copy link
Collaborator

@bowenlan-amzn Could you please review this PR? Thanks!

```
{% include copy-curl.html %}

## Example response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think for this aggregation, it's better to use a visualization to show the response, not the json output

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-05-06 at 9 04 30 PM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the visualization with the explanation.


# Serial diff aggregations

The `serial_diff` aggregation is a parent pipeline aggregation that computes a sequence of differences between values from current and previous aggregations.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `serial_diff` aggregation is a parent pipeline aggregation that computes a sequence of differences between values from current and previous aggregations.
The `serial_diff` aggregation is a parent pipeline aggregation that computes the difference between metric values from current and previous bucket, and put the difference in the current bucket.

For parent pipeline aggregation, I suppose the main thing is it check each bucket of a multi-bucket agg and store the results back to each bucket.
Compared to sibling pipeline aggregation, it sees the whole array of buckets and only return one bucket or metric.

With this context in mind, I hope the suggestion makes sense.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Reworded and added more context.

@bowenlan-amzn bowenlan-amzn moved this from Todo to In-Review in Performance Roadmap May 7, 2025
@kolchfa-aws
Copy link
Collaborator

@bowenlan-amzn Thank you for the review! I addressed your comments.

Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kolchfa-aws Please see my comment and changes and let me know if you have any questions. Thanks!

## Example: Multi-period differences

Use a larger `lag` value to compare with buckets further back in time. The following example computes differences on weekly byte data with a lag of 4 (comparing each bucket with the bucket 4 weeks back). This has the effect of removing any variation with a period of four weeks:

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 130: "compare with buckets further back in time" needs a little revision for clarity, as does "the bucket 4 weeks back".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded.

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
@kolchfa-aws kolchfa-aws added Done but waiting to merge PR: The work is done and ready to merge and removed Tech review PR: Tech review in progress labels May 20, 2025

The `serial_diff` aggregation is a parent pipeline aggregation that calculates the difference between metric values in the current bucket and a previous bucket. It stores the result in the current bucket.

Unlike sibling pipeline aggregations, which operate across all buckets and produce a single output, parent pipeline aggregations process each bucket individually and write the result back into each bucket.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to move this to the main page for pipeline-agg

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@github-project-automation github-project-automation bot moved this from In-Review to In Progress in Performance Roadmap May 20, 2025
Signed-off-by: Fanit Kolchina <[email protected]>
…nsearch-doc-website into aggs-pipeline-ser-diff-1
@kolchfa-aws kolchfa-aws merged commit b81635d into opensearch-project:main May 20, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Performance Roadmap May 20, 2025
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 20, 2025
* Refactor pipeline aggregations to match other aggregation types. Remove aggregations/pipeline-agg.md; Add aggregations/pipeline/index.md. Individual aggregation files added in other PRs.

Signed-off-by: Dave Welsch <[email protected]>

* Add serial_diff pipeline aggregation.

Signed-off-by: Dave Welsch <[email protected]>

* Doc review

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Tech review comment

Signed-off-by: Fanit Kolchina <[email protected]>

* Remove invalid parameter

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Dave Welsch <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
(cherry picked from commit b81635d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
KishoreKicha14 pushed a commit to KishoreKicha14/documentation-website that referenced this pull request Jun 13, 2025
* Refactor pipeline aggregations to match other aggregation types. Remove aggregations/pipeline-agg.md; Add aggregations/pipeline/index.md. Individual aggregation files added in other PRs.

Signed-off-by: Dave Welsch <[email protected]>

* Add serial_diff pipeline aggregation.

Signed-off-by: Dave Welsch <[email protected]>

* Doc review

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Tech review comment

Signed-off-by: Fanit Kolchina <[email protected]>

* Remove invalid parameter

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Dave Welsch <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
epugh pushed a commit to o19s/documentation-website that referenced this pull request Jul 2, 2025
* Refactor pipeline aggregations to match other aggregation types. Remove aggregations/pipeline-agg.md; Add aggregations/pipeline/index.md. Individual aggregation files added in other PRs.

Signed-off-by: Dave Welsch <[email protected]>

* Add serial_diff pipeline aggregation.

Signed-off-by: Dave Welsch <[email protected]>

* Doc review

Signed-off-by: Fanit Kolchina <[email protected]>

* Apply suggestions from code review

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>

* Tech review comment

Signed-off-by: Fanit Kolchina <[email protected]>

* Remove invalid parameter

Signed-off-by: Fanit Kolchina <[email protected]>

---------

Signed-off-by: Dave Welsch <[email protected]>
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
Co-authored-by: Fanit Kolchina <[email protected]>
Co-authored-by: kolchfa-aws <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Eric Pugh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 3.0 Content gap Done but waiting to merge PR: The work is done and ready to merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants