-
Notifications
You must be signed in to change notification settings - Fork 410
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
Support aggregation function in window #9758
Conversation
@@ -32,6 +32,7 @@ void AlignedBuffer::alloc(size_t size, size_t alignment) | |||
fmt::format("Cannot allocate memory (posix_memalign), size: {}, alignment: {}.", size, alignment), | |||
ErrorCodes::CANNOT_ALLOCATE_MEMORY, | |||
res); | |||
assert(buf == nullptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete if in L41? check: https://en.cppreference.com/w/cpp/memory/c/free
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete if in L41? check: https://en.cppreference.com/w/cpp/memory/c/free
done
@@ -265,17 +267,54 @@ void WindowTransformAction::initialPartitionAndOrderColumnIndices() | |||
|
|||
void WindowTransformAction::initialWorkspaces() | |||
{ | |||
// Initialize window function workspaces. | |||
workspaces.reserve(window_description.window_functions_descriptions.size()); | |||
auto workspace_num = window_description.window_functions_descriptions.size(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto workspace_num = window_description.window_functions_descriptions.size(); | |
const auto workspace_num = window_description.window_functions_descriptions.size(); |
for (auto & ws : aggregation_workspaces) | ||
{ | ||
RowNumber start = frame_start; | ||
if (need_decrease && checkIfNeedDecrease()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkIfNeedDecrease()
can be called before this loop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkIfNeedDecrease()
can be called before this loop
done
append_add = true; | ||
} | ||
|
||
bool check_need_decrease = checkIfNeedDecrease(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool check_need_decrease = checkIfNeedDecrease(); | |
bool check_need_decrease = false; | |
if constexpr(need_decrease) | |
check_need_decrease = checkIfNeedDecrease(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
for (auto & ws : aggregation_workspaces) | ||
{ | ||
RowNumber start = frame_start; | ||
if (need_decrease && check_need_decrease) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (need_decrease && check_need_decrease) | |
if (check_need_decrease) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
/cc @guo-shaoge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guo-shaoge, windtalker The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/cherrypick release-8.5-20250310-v8.5.1 |
@xzhangxian1008: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
close #7376 Co-authored-by: xzhangxian1008 <[email protected]>
What problem does this PR solve?
Issue Number: close #7376
Problem Summary:
What is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note