-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat: implement HistogramFold
plan for prometheus histogram type
#2626
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Signed-off-by: Ruihang Xia <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2626 +/- ##
===========================================
- Coverage 85.34% 84.79% -0.56%
===========================================
Files 737 740 +3
Lines 118012 119840 +1828
===========================================
+ Hits 100722 101617 +895
- Misses 17290 18223 +933 |
yuanbohan
reviewed
Oct 20, 2023
yuanbohan
approved these changes
Oct 20, 2023
yuanbohan
reviewed
Oct 20, 2023
zhongzc
reviewed
Oct 20, 2023
Signed-off-by: Ruihang Xia <[email protected]>
zhongzc
approved these changes
Oct 20, 2023
zhongzc
approved these changes
Oct 20, 2023
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.
LGTM
2 tasks
35 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
Part one of prometheus histogram. The next part is about planner and quantile.
HistogramFold
HistogramFold
will fold the conventional (non-native) histogram (1) for latercomputing. Specifically, it will transform the
le
andfield
column into a complextype, and samples on other tag columns:
le
will become a [ListArray] of [f64]. With each bucket bound parsedfield
will become a [ListArray] of [f64]bucket_num
element, but their types won't change.Due to the folding or sampling, the output rows number will become
input_rows
/bucket_num
.le
should be the same across the entire metric. Thus it can be aDict<List<f64>>
to reduce size. However this is not viable at present because I cannot construct such a dict array 🥲Requirement
<tag list>, le ASC, ts
.le
should be same. I.e., buckets of every series should be same.Result
It's output looks like
Checklist
Refer to a related PR or issue link (optional)