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

feat: Prom SeriesNormalize plan #787

Merged
merged 9 commits into from
Dec 27, 2022
Merged

Conversation

waynexia
Copy link
Member

@waynexia waynexia commented Dec 26, 2022

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Add SeriesNormalize plan described in the RFC.

It only biases the timestamp column with "offset" and sorts the input.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

#596

Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia added the WIP label Dec 26, 2022
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia marked this pull request as ready for review December 26, 2022 07:32
Signed-off-by: Ruihang Xia <[email protected]>
@codecov
Copy link

codecov bot commented Dec 26, 2022

Codecov Report

Merging #787 (d7f29d3) into develop (1daba75) will decrease coverage by 0.18%.
The diff coverage is 57.84%.

❗ Current head d7f29d3 differs from pull request most recent head 274fbc4. Consider uploading reports for the commit 274fbc4 to get more accurate results

@@             Coverage Diff             @@
##           develop     #787      +/-   ##
===========================================
- Coverage    85.43%   85.25%   -0.19%     
===========================================
  Files          414      418       +4     
  Lines        54221    54525     +304     
===========================================
+ Hits         46325    46483     +158     
- Misses        7896     8042     +146     
Flag Coverage Δ
rust 85.25% <57.84%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/datatypes/src/schema.rs 94.69% <ø> (+1.13%) ⬆️
src/datatypes/src/schema/column_schema.rs 100.00% <ø> (ø)
src/promql/src/lib.rs 100.00% <ø> (ø)
src/promql/src/extension_plan/normalize.rs 57.84% <57.84%> (ø)
src/object-store/src/test_util.rs 0.00% <0.00%> (-100.00%) ⬇️
src/client/src/database.rs 70.22% <0.00%> (-12.51%) ⬇️
tests-integration/src/test_util.rs 87.98% <0.00%> (-11.54%) ⬇️
src/datanode/src/instance.rs 32.40% <0.00%> (-11.18%) ⬇️
src/datatypes/src/vectors/constant.rs 83.20% <0.00%> (-3.06%) ⬇️
src/sql/src/statements/alter.rs 28.57% <0.00%> (-3.01%) ⬇️
... and 49 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@waynexia waynexia removed the WIP label Dec 26, 2022
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/lib.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/promql/src/extension_plan/normalize.rs Show resolved Hide resolved
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia requested a review from evenyag December 26, 2022 12:19
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia requested a review from evenyag December 27, 2022 07:51
src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
src/datatypes/src/schema.rs Show resolved Hide resolved
@waynexia waynexia requested a review from evenyag December 27, 2022 08:21
Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

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

LGTM

src/promql/src/extension_plan/normalize.rs Outdated Show resolved Hide resolved
Signed-off-by: Ruihang Xia <[email protected]>
@waynexia waynexia merged commit 9099058 into GreptimeTeam:develop Dec 27, 2022
@waynexia waynexia deleted the prom-plan branch December 27, 2022 14:59
@waynexia waynexia mentioned this pull request Jan 13, 2023
26 tasks
@waynexia waynexia added this to the v0.1 milestone Feb 15, 2023
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: impl SeriesNormalize plan

Signed-off-by: Ruihang Xia <[email protected]>

* some tests

Signed-off-by: Ruihang Xia <[email protected]>

* feat: add metrics

Signed-off-by: Ruihang Xia <[email protected]>

* add license header

Signed-off-by: Ruihang Xia <[email protected]>

* resolve CR comments

Signed-off-by: Ruihang Xia <[email protected]>

* update tests

Signed-off-by: Ruihang Xia <[email protected]>

* make time index column a parameter

Signed-off-by: Ruihang Xia <[email protected]>

* precompute time index column index

Signed-off-by: Ruihang Xia <[email protected]>

* sign the TODO

Signed-off-by: Ruihang Xia <[email protected]>

Signed-off-by: Ruihang Xia <[email protected]>
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