[Backport 2.19-dev] Support chart command in PPL (#4579)
#4756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
--signoffor-s.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.