Skip to content

Conversation

@yuancu
Copy link
Collaborator

@yuancu yuancu commented Nov 7, 2025

Description

Backport #4579 to 2.19-dev

Commit Message

  • WIP: Make poc implementation for chart command

  • Support param useother and otherstr

  • Support usenull and nullstr (when both row split and col split present)

  • Append a final aggregation to merge OTHER categories

  • Handle common agg functions for OTHER category for timechart

  • Fix timechart IT

  • Sort earliest results with asc order

  • Support non-string fields as column split

  • Fix min/earliest order & fix non-accumulative agg for chart

  • Hint non-null in aggregateWithTrimming

  • Add integration tests for chart command

  • Add unit tests

  • Add doc for chart command

  • Prompt users that multiple agg is not supported

  • Add explain ITs

  • Remove unimplemented support for multiple aggregations in chart command

  • Add unit tests for chart command

  • Remove irrelevant yaml test

  • Tweak chart.rst

  • Swap the order of chart output to ensure metrics come last

  • Filter rows without col split when calculate grand total

  • Chores: tweak code order

  • Add anonymize test to chart command

  • Change grammart from limit=top 10 to limit=top10

  • Update chart doc

  • Rename row_number for chart to row_number_chart

  • Sort by row and col splits on top of chart results

  • Ignore rows without a row split in chart command

  • Keep categories with max summed values when top k is set

  • Simplify toAddHintsOnAggregate condition

  • Chores: eliminate unnecessary variables

  • Apply a non-null filter on fields referred by aggregations

  • Fix chart plans

  • Get rid of record class

  • Move ranking by column split to a helper function


(cherry picked from commit 5523932)

Related Issues

Resolves #399

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

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

* WIP: Make poc implementation for chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Support param useother and otherstr

Signed-off-by: Yuanchun Shen <[email protected]>

* Support usenull and nullstr (when both row split and col split present)

Signed-off-by: Yuanchun Shen <[email protected]>

* Append a final aggregation to merge OTHER categories

Signed-off-by: Yuanchun Shen <[email protected]>

* Handle common agg functions for OTHER category for timechart

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix timechart IT

Signed-off-by: Yuanchun Shen <[email protected]>

* Sort earliest results with asc order

Signed-off-by: Yuanchun Shen <[email protected]>

* Support non-string fields as column split

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix min/earliest order & fix non-accumulative agg for chart

Signed-off-by: Yuanchun Shen <[email protected]>

* Hint non-null in aggregateWithTrimming

Signed-off-by: Yuanchun Shen <[email protected]>

* Add integration tests for chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Add unit tests

Signed-off-by: Yuanchun Shen <[email protected]>

* Add doc for chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Prompt users that multiple agg is not supported

Signed-off-by: Yuanchun Shen <[email protected]>

* Add explain ITs

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove unimplemented support for multiple aggregations in chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Add unit tests for chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Remove irrelevant yaml test

Signed-off-by: Yuanchun Shen <[email protected]>

* Tweak chart.rst

Signed-off-by: Yuanchun Shen <[email protected]>

* Swap the order of chart output to ensure metrics come last

Signed-off-by: Yuanchun Shen <[email protected]>

* Filter rows without col split when calculate grand total

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: tweak code order

Signed-off-by: Yuanchun Shen <[email protected]>

* Add anonymize test to chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Change grammart from limit=top 10 to limit=top10

Signed-off-by: Yuanchun Shen <[email protected]>

* Update chart doc

Signed-off-by: Yuanchun Shen <[email protected]>

* Rename __row_number__ for chart to _row_number_chart_

Signed-off-by: Yuanchun Shen <[email protected]>

* Sort by row and col splits on top of chart results

Signed-off-by: Yuanchun Shen <[email protected]>

* Ignore rows without a row split in chart command

Signed-off-by: Yuanchun Shen <[email protected]>

* Keep categories with max summed values when top k is set

Signed-off-by: Yuanchun Shen <[email protected]>

* Simplify toAddHintsOnAggregate condition

Signed-off-by: Yuanchun Shen <[email protected]>

* Chores: eliminate unnecessary variables

Signed-off-by: Yuanchun Shen <[email protected]>

* Apply a non-null filter on fields referred by aggregations

Signed-off-by: Yuanchun Shen <[email protected]>

* Fix chart plans

Signed-off-by: Yuanchun Shen <[email protected]>

* Get rid of record class

Signed-off-by: Yuanchun Shen <[email protected]>

* Move ranking by column split to a helper function

Signed-off-by: Yuanchun Shen <[email protected]>

---------

Signed-off-by: Yuanchun Shen <[email protected]>
(cherry picked from commit 5523932)
Signed-off-by: Yuanchun Shen <[email protected]>
@yuancu yuancu force-pushed the backport/backport-4579-to-2.19-dev branch from 3e14b2f to cb5fe97 Compare November 10, 2025 03:15
@LantaoJin LantaoJin merged commit 8ead12a into opensearch-project:2.19-dev Nov 10, 2025
45 checks passed
@yuancu yuancu deleted the backport/backport-4579-to-2.19-dev branch November 10, 2025 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants