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(frontend): separate post-agg Project from LogicalAgg::create #2266

Merged
merged 3 commits into from
May 3, 2022

Conversation

xiangjinwu
Copy link
Contributor

@xiangjinwu xiangjinwu commented May 3, 2022

What's changed and what's your intention?

Post-agg Project from select_items (and post-agg Filter from having) will not be planned inside LogicalAgg::create. This allows reusing the subquery expr handling logic in plan_select. It will only create LogicalAgg with agg_calls extract from select_items (and having) and return the rewritten select_items (and having).

Also reverts the unnecessary separation of bind_select and BoundSelect::create in #2220 (comment)

Checklist

  • I have written necessary docs and comments
    - [ ] I have added necessary unit tests and integration tests (Refactor does not break existing tests.)

Refer to a related PR or issue link (optional)

@codecov
Copy link

codecov bot commented May 3, 2022

Codecov Report

Merging #2266 (98a0527) into main (f2dc7c1) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2266      +/-   ##
==========================================
- Coverage   71.24%   71.23%   -0.01%     
==========================================
  Files         655      655              
  Lines       83544    83515      -29     
==========================================
- Hits        59520    59493      -27     
+ Misses      24024    24022       -2     
Flag Coverage Δ
rust 71.23% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/frontend/src/binder/select.rs 94.69% <100.00%> (-0.77%) ⬇️
...rc/frontend/src/optimizer/plan_node/logical_agg.rs 97.47% <100.00%> (-0.05%) ⬇️
src/frontend/src/planner/select.rs 92.85% <100.00%> (+0.04%) ⬆️
src/meta/src/stream/stream_manager.rs 65.62% <0.00%> (+0.15%) ⬆️
src/common/src/types/ordered_float.rs 24.30% <0.00%> (+0.19%) ⬆️

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

@xiangjinwu xiangjinwu marked this pull request as ready for review May 3, 2022 03:15
Copy link
Contributor

@likg227 likg227 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiangjinwu xiangjinwu merged commit d75b905 into main May 3, 2022
@xiangjinwu xiangjinwu deleted the rust-frontend-refactor-logical-agg-create branch May 3, 2022 05:05
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.

None yet

2 participants