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(flow): accumlator for aggr func #3396

Merged
merged 14 commits into from
Mar 12, 2024

Conversation

discord9
Copy link
Contributor

@discord9 discord9 commented Feb 27, 2024

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Added several types of accumlator to store all the needed information during streaming and accumlate data in a aggr func, note that those accumlator also record counts of non null value:

  • Bool accumlator, counting numbers of true and false, for functions like any, all, max(bool) and min(bool)
  • SimpleNumber accumlator keep records of one single i128 for functions like count and sum for integer.
  • Float accumlator store a 64bit float number and counts of pos/neg inf&nans, for sum with float number
  • OrdValue accumlator store a single Value formin/max

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Refer to a related PR or issue link (optional)

@github-actions github-actions bot added the docs-not-required This change does not impact docs. label Feb 27, 2024
@discord9 discord9 marked this pull request as ready for review February 27, 2024 09:51
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 70.92360% with 255 lines in your changes are missing coverage. Please review.

Project coverage is 85.07%. Comparing base (dbb1ce1) to head (1fe914e).
Report is 56 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3396      +/-   ##
==========================================
+ Coverage   85.04%   85.07%   +0.02%     
==========================================
  Files         893      908      +15     
  Lines      147899   151892    +3993     
==========================================
+ Hits       125781   129218    +3437     
- Misses      22118    22674     +556     

src/flow/src/expr/relation/func.rs Outdated Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Outdated Show resolved Hide resolved
src/flow/Cargo.toml Outdated Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Outdated Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Outdated Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Show resolved Hide resolved
src/flow/src/expr/relation/accum.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Mar 12, 2024
Merged via the queue into GreptimeTeam:main with commit 7639c22 Mar 12, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required This change does not impact docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants