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

refactor(simple-agg): use fe generated table catalog for simple agg + some code-reuse refactor #3514

Merged
merged 3 commits into from
Jun 29, 2022

Conversation

BowenXiao1999
Copy link
Contributor

@BowenXiao1999 BowenXiao1999 commented Jun 28, 2022

…nd some simple refactor

I hereby agree to the terms of the Singularity Data, Inc. Contributor License Agreement.

What's changed and what's your intention?

  • Add a method in mod.rs generate_state_table_from_proto. Currently reused by global agg and simple agg.
  • Add a method in test_util.rs new_boxed_simple_agg_executor. Currently used by tests in simple agg.

Checklist

  • I have written necessary docs and comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented Jun 28, 2022

Codecov Report

Merging #3514 (44b9a4a) into main (41f05f7) will increase coverage by 0.00%.
The diff coverage is 68.38%.

@@           Coverage Diff           @@
##             main    #3514   +/-   ##
=======================================
  Coverage   74.48%   74.49%           
=======================================
  Files         771      771           
  Lines      108317   108342   +25     
=======================================
+ Hits        80684    80709   +25     
  Misses      27633    27633           
Flag Coverage Δ
rust 74.49% <68.38%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/stream/src/executor/aggregation/mod.rs 78.37% <0.00%> (-14.82%) ⬇️
src/stream/src/executor/hash_agg.rs 97.82% <ø> (ø)
src/stream/src/from_proto/global_simple_agg.rs 0.00% <0.00%> (ø)
src/stream/src/from_proto/hash_agg.rs 0.00% <0.00%> (ø)
src/stream/src/executor/test_utils.rs 95.23% <98.94%> (+4.82%) ⬆️
src/stream/src/executor/global_simple_agg.rs 95.85% <100.00%> (-0.15%) ⬇️
src/stream/src/executor/integration_tests.rs 98.56% <100.00%> (-0.01%) ⬇️
src/meta/src/hummock/mock_hummock_meta_client.rs 40.56% <0.00%> (-0.95%) ⬇️
src/storage/src/hummock/iterator/merge_inner.rs 89.37% <0.00%> (-0.63%) ⬇️
src/common/src/types/ordered_float.rs 24.70% <0.00%> (-0.20%) ⬇️
... and 4 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

// Create state tables for each agg call.
let mut state_tables = Vec::with_capacity(agg_calls.len());
for (agg_call, ks) in agg_calls.iter().zip_eq(&keyspace) {
state_tables.push(generate_state_table(
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove generate_state_table now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's now only used in unit test. For test, the CN still infer it by itself. I should add a test only tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Emmm I do not find one. Moved them all to test_utils.rs

Copy link
Contributor

@st1page st1page left a comment

Choose a reason for hiding this comment

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

LGTM

@BowenXiao1999 BowenXiao1999 added the mergify/can-merge Indicates that the PR can be added to the merge queue label Jun 29, 2022
@mergify mergify bot merged commit b8a4b47 into main Jun 29, 2022
@mergify mergify bot deleted the bw/simple_agg_fe_infer branch June 29, 2022 03:44
huangjw806 pushed a commit that referenced this pull request Jul 5, 2022
… some code-reuse refactor (#3514)

* refactor(simple-agg): use fe generated table catalog for simple agg and some simple refactor

* move generate_state_table to test mod (test only)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergify/can-merge Indicates that the PR can be added to the merge queue type/refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants