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

perf(agg): reuse existing agg calls while building LogicalAgg #8200

Merged
merged 5 commits into from
Feb 27, 2023

Conversation

stdrc
Copy link
Member

@stdrc stdrc commented Feb 27, 2023

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

As title, fix #8196.

Checklist For Contributors

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Checklist For Reviewers

  • I have requested macro/micro-benchmarks as this PR can affect performance substantially, and the results are shown.

Documentation

  • My PR DOES NOT contain user-facing changes.
Click here for Documentation

Types of user-facing changes

Please keep the types that apply to your changes, and remove the others.

  • Installation and deployment
  • Connector (sources & sinks)
  • SQL commands, functions, and operators
  • RisingWave cluster configuration changes
  • Other (please specify in the release note below)

Release note

Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
@stdrc stdrc marked this pull request as ready for review February 27, 2023 08:41
@stdrc stdrc requested review from BugenZhao, shanicky, chenzl25 and kwannoel and removed request for BugenZhao and shanicky February 27, 2023 08:42
Copy link
Contributor

@kwannoel kwannoel left a comment

Choose a reason for hiding this comment

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

LGTM

@stdrc stdrc enabled auto-merge February 27, 2023 09:44
@stdrc stdrc added this pull request to the merge queue Feb 27, 2023
@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Merging #8200 (2e99d75) into main (1537880) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #8200      +/-   ##
==========================================
- Coverage   71.71%   71.71%   -0.01%     
==========================================
  Files        1130     1130              
  Lines      182321   182305      -16     
==========================================
- Hits       130754   130733      -21     
- Misses      51567    51572       +5     
Flag Coverage Δ
rust 71.71% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...rc/frontend/src/optimizer/plan_node/logical_agg.rs 98.14% <100.00%> (-0.03%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 64.43% <0.00%> (-1.04%) ⬇️
src/storage/src/hummock/sstable/multi_builder.rs 97.36% <0.00%> (-0.33%) ⬇️
src/storage/src/hummock/compactor/mod.rs 80.19% <0.00%> (-0.20%) ⬇️
src/meta/src/hummock/manager/mod.rs 75.62% <0.00%> (-0.07%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@chenzl25 chenzl25 left a comment

Choose a reason for hiding this comment

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

LGTM!

└─StreamGlobalSimpleAgg { aggs: [count, sum0(count), count(bid.auction)] }
└─StreamExchange { dist: Single }
└─StreamProject { exprs: [bid.auction, count] }
└─StreamAppendOnlyHashAgg { group_key: [bid.auction], aggs: [count, count] }
Copy link
Member

Choose a reason for hiding this comment

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

Seems we still have 2 counts here? 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

That's because the internal count inserted when building streaming plan. Will get rid of it later (#8197).

Merged via the queue into main with commit 22a4aec Feb 27, 2023
@stdrc stdrc deleted the rc/merge-identical-agg branch February 27, 2023 10:19
@stdrc stdrc mentioned this pull request Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

opt(agg): reuse existing agg calls while building LogicalAgg
4 participants