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

fix(optimizer): fix DistinctAggRule to correctly handle queries with intersected arguments between distinct and non-distincted agg calls #7688

Merged
merged 6 commits into from
Feb 7, 2023

Conversation

stdrc
Copy link
Member

@stdrc stdrc commented Feb 3, 2023

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

What's changed and what's your intention?

Fixes #7680.

Checklist

  • 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).
  • 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 the issue)
  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

#7680

stdrc added 4 commits February 3, 2023 15:20
Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
Signed-off-by: Richard Chien <stdrc@outlook.com>
@stdrc stdrc added type/fix Bug fix component/optimizer Query optimization. labels Feb 3, 2023
@stdrc stdrc requested review from st1page and fuyufjh February 3, 2023 08:10
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #7688 (61292a5) into main (5ffba37) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #7688   +/-   ##
=======================================
  Coverage   71.62%   71.63%           
=======================================
  Files        1098     1098           
  Lines      175078   175082    +4     
=======================================
+ Hits       125406   125415    +9     
+ Misses      49672    49667    -5     
Flag Coverage Δ
rust 71.63% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...c/frontend/src/optimizer/rule/distinct_agg_rule.rs 98.71% <100.00%> (+0.02%) ⬆️
src/stream/src/executor/aggregation/minput.rs 96.24% <0.00%> (-0.11%) ⬇️
src/storage/src/hummock/compactor/mod.rs 80.95% <0.00%> (ø)
src/meta/src/hummock/manager/mod.rs 78.22% <0.00%> (+0.12%) ⬆️
src/storage/src/hummock/sstable_store.rs 64.89% <0.00%> (+0.15%) ⬆️
src/object_store/src/object/mod.rs 51.51% <0.00%> (+0.21%) ⬆️
src/meta/src/hummock/mock_hummock_meta_client.rs 65.78% <0.00%> (+1.05%) ⬆️

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

@likg227
Copy link
Contributor

likg227 commented Feb 7, 2023

LGTM

Signed-off-by: Richard Chien <stdrc@outlook.com>
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

@mergify mergify bot merged commit d785ab2 into main Feb 7, 2023
@mergify mergify bot deleted the rc/fix-distinct-agg-rule branch February 7, 2023 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/optimizer Query optimization. type/fix Bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: wrong query plan for certain distinct count query
3 participants