-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[TSVB2Lens] Support top_hit of size 1 aggregation #125766
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question - you chose to convert it to formula, why not last_value
quick function? That would give the extra option to pass Order by
-> Sort by date field
. Also, I am wondering maybe we should block support when the order is set to ascending, because in Lens we only support last value
but not first value
(so when we have sorting order set to ascending the chart is different)
Apart from that, why they differ so much? I do not understand 😅 EDIT- I do understand now, it's the time interval that is different (second image corrects it)
@mbondyra The Lens one is using 3 hour buckets, the tsvb is using 4 hour buckets due to the different "auto" interval behavior. |
Agree about using the quick function for this if possible would be better to stay consistent. Also, I know I came up with this idea but I realized it's actually not completely identical - TSVB is able to handle last value of a multi value by using the provided aggregation function, but Lens will show a warning. I think it's still fine to do this conversion as there are other small differences, just wanted to note. |
@elasticmachine merge upstream |
@mbondyra @flash1293 I replaced it to work with the quick function and not allow it for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retested and works as expected. I don't have a strong opinion too, just wondering. I think what would help is if we add this option in Lens, if users actually use it :)
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Ok I will merge it then :) I don't think that it hurts anyone even if it might support very few TSVB to Lens transitions :) |
Summary
Part of #125539
It adds support for
TopHit
aggregations with size 1. The layer is translated to a quick functionlast_value
.Checklist