Skip to content

feat: impl RangeArray based on DictionaryArray#796

Merged
v0y4g3r merged 8 commits intoGreptimeTeam:developfrom
waynexia:sliding-range
Jan 3, 2023
Merged

feat: impl RangeArray based on DictionaryArray#796
v0y4g3r merged 8 commits intoGreptimeTeam:developfrom
waynexia:sliding-range

Conversation

@waynexia
Copy link
Copy Markdown
Member

Signed-off-by: Ruihang Xia waynestxia@gmail.com

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Implement the RangeArray as described in RFC: https://github.com/GreptimeTeam/greptimedb/blob/develop/docs/rfcs/2022-12-20-promql-in-rust/rfc.md#data-model

It's a basic type of the PromQL execute extension. To represent Matrix or RangeVector in Prometheus. See the document of RangeArray struct for a detailed explaination.

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 <waynestxia@gmail.com>
@waynexia waynexia marked this pull request as ready for review December 28, 2022 06:28
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 28, 2022

Codecov Report

Merging #796 (00dae6e) into develop (26848f9) will decrease coverage by 0.18%.
The diff coverage is 86.30%.

@@             Coverage Diff             @@
##           develop     #796      +/-   ##
===========================================
- Coverage    85.34%   85.15%   -0.19%     
===========================================
  Files          418      418              
  Lines        54311    55157     +846     
===========================================
+ Hits         46351    46970     +619     
- Misses        7960     8187     +227     
Flag Coverage Δ
rust 85.15% <86.30%> (-0.19%) ⬇️

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

Impacted Files Coverage Δ
src/promql/src/error.rs 0.00% <0.00%> (ø)
src/promql/src/lib.rs 100.00% <ø> (ø)
src/promql/src/range_array.rs 86.66% <86.66%> (ø)
src/object-store/src/test_util.rs 0.00% <0.00%> (-100.00%) ⬇️
src/frontend/src/sql.rs 0.00% <0.00%> (-89.75%) ⬇️
src/api/src/error.rs 7.14% <0.00%> (-28.58%) ⬇️
tests-integration/src/test_util.rs 87.74% <0.00%> (-11.78%) ⬇️
src/datanode/src/instance.rs 32.40% <0.00%> (-11.18%) ⬇️
src/catalog/src/error.rs 74.68% <0.00%> (-7.93%) ⬇️
src/mito/src/error.rs 75.86% <0.00%> (-6.19%) ⬇️
... and 82 more

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

Comment thread src/promql/src/range_array.rs Outdated
Comment thread src/promql/src/range_array.rs
Comment thread src/promql/src/range_array.rs Outdated
@waynexia waynexia requested a review from evenyag December 30, 2022 09:52
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Comment thread src/promql/src/range_array.rs
Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Comment thread src/promql/src/range_array.rs Outdated
Comment thread src/promql/src/range_array.rs Outdated
Comment thread src/promql/src/range_array.rs Outdated
waynexia and others added 2 commits January 3, 2023 16:11
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Copy link
Copy Markdown
Contributor

@v0y4g3r v0y4g3r left a comment

Choose a reason for hiding this comment

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

LGTM

@v0y4g3r v0y4g3r merged commit f907a93 into GreptimeTeam:develop Jan 3, 2023
@waynexia waynexia deleted the sliding-range branch January 3, 2023 10:04
@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 RangeArray based on DictionaryArray

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix clippys

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* apply review suggs

* fix typo

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* update license header

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* Apply suggestions from code review

Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>

* update doc to change i32 to u32

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com>
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