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

perf(over window): pass through Updates not affecting window function outputs #19056

Merged
merged 5 commits into from
Oct 28, 2024

Conversation

stdrc
Copy link
Member

@stdrc stdrc commented Oct 22, 2024

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

What's changed and what's your intention?

If an incoming Update only changes fields other than partition key, order key and window function arguments, the win func outputs should stay the same. This PR eliminates the redundant re-computation for such kind of Updates.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • 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 needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@stdrc stdrc changed the title move out ensure_delta_in_cache call perf(over window): pass through Updates not affecting window function outputs Oct 22, 2024
@stdrc stdrc marked this pull request as ready for review October 22, 2024 09:40
@stdrc stdrc requested review from xxchan and st1page October 22, 2024 09:40
@stdrc stdrc marked this pull request as draft October 22, 2024 15:11
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from ea11b3a to f07a9fa Compare October 23, 2024 07:18
@stdrc stdrc force-pushed the rc/over-window-opt-common-info branch from 5f48086 to 988e6d9 Compare October 23, 2024 08:04
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from bdbbc67 to 0d87ab2 Compare October 23, 2024 08:04
@stdrc stdrc force-pushed the rc/over-window-opt-common-info branch from 988e6d9 to 41bdd90 Compare October 23, 2024 08:08
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from 0d87ab2 to 0fc881d Compare October 23, 2024 08:08
@stdrc stdrc marked this pull request as ready for review October 23, 2024 08:16
@stdrc stdrc force-pushed the rc/over-window-opt-common-info branch from 41bdd90 to 0bd0784 Compare October 23, 2024 12:41
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from 099e640 to 1eb8388 Compare October 23, 2024 12:41
@stdrc stdrc requested review from fuyufjh and wenym1 October 24, 2024 05:47
@stdrc stdrc force-pushed the rc/over-window-opt-common-info branch from 0bd0784 to 8495823 Compare October 25, 2024 06:15
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from 48e3886 to ca48be1 Compare October 25, 2024 06:15
Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

I can now understand if the result of the func call is persisted, this optimization makes sense (sth like MaterializedProject will be similar), but I'm not familiar with the previous impl of OverWindow and why we persisted the func calls here.

Also code is not reviewed, but loc looks good.

So rubber stamp

Base automatically changed from rc/over-window-opt-common-info to main October 28, 2024 09:40
@graphite-app graphite-app bot requested review from a team October 28, 2024 09:43
@stdrc stdrc force-pushed the rc/over-window-opt-pass-through-unchanged branch from ca48be1 to 13778ee Compare October 28, 2024 09:45
@stdrc stdrc enabled auto-merge October 28, 2024 09:46
@stdrc stdrc added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 0d013ea Oct 28, 2024
29 of 30 checks passed
@stdrc stdrc deleted the rc/over-window-opt-pass-through-unchanged branch October 28, 2024 10:57
stdrc added a commit that referenced this pull request Nov 4, 2024
stdrc added a commit that referenced this pull request Nov 8, 2024
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.

2 participants