Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TSVB] Fix percentile rank math #132003

Merged
merged 1 commit into from
May 11, 2022
Merged

Conversation

flash1293
Copy link
Contributor

Fixes #131901

The code mapping series to variables for the math operation is assuming a percentile variable if percentileValueMatch matches the field name:

const percentileMatch = v.field.match(percentileValueMatch);

But it can actually be either percentile or percentile rank.

This PR adds a condition for these two cases and makes sure the downstream code receives the structure it expects.

@flash1293 flash1293 added Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure backport:skip This commit does not require backporting v8.3.0 labels May 11, 2022
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293 flash1293 marked this pull request as ready for review May 11, 2022 09:37
@flash1293 flash1293 requested a review from a team as a code owner May 11, 2022 09:37
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

LGTM! I did an investigation yesterday and I made the same conslusion! Now it works fine 💯

@flash1293 flash1293 merged commit 2e97949 into elastic:main May 11, 2022
academo pushed a commit to academo/kibana that referenced this pull request May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:TSVB TSVB (Time Series Visual Builder) release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can not use Math aggregation with Percentile Rank
4 participants