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(stream,batch,optimizer): support grouping agg call #11006

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

chenzl25
Copy link
Contributor

@chenzl25 chenzl25 commented Jul 18, 2023

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

What's changed and what's your intention?

  • Support Grouping agg call. Related issue Tracking: Support Grouping Sets #9284
  • PG Grouping operations doc. https://www.postgresql.org/docs/9.5/functions-aggregate.html
  • Grouping operations are used in conjunction with grouping sets (see Section 7.2.4) to distinguish result rows. The arguments to the GROUPING operation are not actually evaluated, but they must match exactly expressions given in the GROUP BY clause of the associated query level. Bits are assigned with the rightmost argument being the least-significant bit; each bit is 0 if the corresponding expression is included in the grouping criteria of the grouping set generating the result row, and 1 if it is not

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 Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR contains 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

@chenzl25 chenzl25 changed the title support grouping agg call feat(stream,batch,optimizer): support grouping agg call Jul 18, 2023
@chenzl25 chenzl25 mentioned this pull request Jul 18, 2023
5 tasks
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #11006 (488802f) into main (9587646) will increase coverage by 0.00%.
The diff coverage is 93.33%.

@@           Coverage Diff           @@
##             main   #11006   +/-   ##
=======================================
  Coverage   69.91%   69.92%           
=======================================
  Files        1309     1309           
  Lines      223927   224002   +75     
=======================================
+ Hits       156564   156635   +71     
- Misses      67363    67367    +4     
Flag Coverage Δ
rust 69.92% <93.33%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
src/expr/src/agg/def.rs 67.44% <0.00%> (-0.64%) ⬇️
...rc/frontend/src/optimizer/plan_node/logical_agg.rs 96.55% <78.94%> (-0.30%) ⬇️
src/frontend/src/expr/agg_call.rs 75.20% <100.00%> (+0.20%) ⬆️
src/frontend/src/expr/mod.rs 79.17% <100.00%> (+0.09%) ⬆️
...src/optimizer/rule/grouping_sets_to_expand_rule.rs 97.82% <100.00%> (+1.23%) ⬆️

... and 2 files with indirect coverage changes

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

Copy link
Contributor

@stdrc stdrc left a comment

Choose a reason for hiding this comment

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

LGTM!

@chenzl25 chenzl25 enabled auto-merge July 20, 2023 03:36
@chenzl25 chenzl25 added this pull request to the merge queue Jul 20, 2023
Merged via the queue into main with commit ca7d15f Jul 20, 2023
35 of 36 checks passed
@chenzl25 chenzl25 deleted the dylan/support_grouping_agg_call branch July 20, 2023 04:33
@xiangjinwu xiangjinwu added the user-facing-changes Contains changes that are visible to users label Jul 31, 2023
@emile-00 emile-00 added the 📖✓ Covered or will be covered in the user docs. label Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature user-facing-changes Contains changes that are visible to users 📖✓ Covered or will be covered in the user docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants