-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BugFix] fix asan crash in array_map #51966
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
Signed-off-by: silverbullet233 <[email protected]>
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 12 / 13 (92.31%) file detail
|
LiShuMing
approved these changes
Oct 17, 2024
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.
solid!
satanson
approved these changes
Oct 17, 2024
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 17, 2024
Signed-off-by: silverbullet233 <[email protected]> (cherry picked from commit e27972e)
42 tasks
mergify bot
pushed a commit
that referenced
this pull request
Oct 17, 2024
Signed-off-by: silverbullet233 <[email protected]> (cherry picked from commit e27972e)
42 tasks
@mergify backport branch-3.3.5 |
✅ Backports have been created
|
mergify bot
pushed a commit
that referenced
this pull request
Oct 17, 2024
Signed-off-by: silverbullet233 <[email protected]> (cherry picked from commit e27972e)
42 tasks
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 17, 2024
Co-authored-by: eyes_on_me <[email protected]>
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 17, 2024
Co-authored-by: eyes_on_me <[email protected]>
wanpengfei-git
pushed a commit
that referenced
this pull request
Oct 17, 2024
Co-authored-by: eyes_on_me <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I'm doing:
What I'm doing:
Fixes https://github.com/StarRocks/StarRocksTest/issues/8699
root cause
this crash is because we can't find the slot id in chunk and then can't pass the DCHECK inside it.
In fact, for
array_map(x -> array_map(x->x+100, x),[[1,23],[4,3,2]])
, the lambda exprx->array_map(x->x+100,x)
only depends on the lambda argument, not on other capture columns.
capture_slot_ids
should be empty here.But the argument of the inner lambda expr
array_map(x->x+100,x)
is mistakenly regarded as the capture column and be added into the capture_slot_ids.LambdaFunction::get_slot_ids
to get the capture columns' slot id, and the result of this interface incorrectly includes the lambda argument id. this is the root cause of the above crash.extract_outer_common_exprs
, we need to know the maximum slot_id used in the currentExpr
tree. The rewritten ColumnRef will allocate slot_id from themax_used_slot_id + 1
. Here we need to consider the slot_id used by the lambda arguments. Currently,LambdaFunction:get_slot_ids
is also used to get the result.Obviously, these two places rely on
LambdaFunction::get_slot_ids
and there is a conflict. One needs to consider the lambda argument and the other does not.To solve this problem
LambdaFunction::get_slot_ids
, and only include the capture columns' slot id in the return resultExpr::for_each_slot_id
to traverse all slot ids in a certain Expr tree.What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: