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

Refine window when preceding and following boundary type are unbounded #9916

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xzhangxian1008
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #9913

Problem Summary:

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Refine window when preceding and following boundary type are unbounded

@ti-chi-bot ti-chi-bot bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Feb 26, 2025
Copy link
Contributor

ti-chi-bot bot commented Feb 26, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign searise for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 26, 2025
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 27, 2025
@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker @guo-shaoge

@ti-chi-bot ti-chi-bot bot requested review from guo-shaoge and windtalker March 3, 2025 05:37
@xzhangxian1008
Copy link
Contributor Author

/cc @windtalker @guo-shaoge


has_shortcut = window_description_.frame.begin_type == WindowFrame::BoundaryType::Unbounded
&& window_description_.frame.end_type == WindowFrame::BoundaryType::Unbounded
&& !aggregation_workspaces.empty();
Copy link
Contributor

Choose a reason for hiding this comment

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

and window_workspaces should be empty?

@@ -292,6 +295,9 @@ void WindowTransformAction::initialWorkspaces()
}
}

// Can not have window and agg functions together in one window
assert((!aggregation_workspaces.empty() && !window_workspaces.empty()) == false);
Copy link
Contributor

Choose a reason for hiding this comment

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

why have this restriction?

Block WindowTransformAction::tryGetOutputBlock()
{
// first try calculate the result based on current data
tryCalculate();
if (window_description.need_decrease)
Copy link
Contributor

Choose a reason for hiding this comment

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

if need_decrease is true, has_shortcut should always be false?

@xzhangxian1008
Copy link
Contributor Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refine window when preceding and following boundary are unbounded
2 participants