-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 error scan operator's column order in the IcebergEqualityDeleteRewriteRule. #52510
[BugFix] fix error scan operator's column order in the IcebergEqualityDeleteRewriteRule. #52510
Conversation
…yDeleteRewriteRule. Signed-off-by: stephen <[email protected]>
newColRefToColBuilder.put(originToNewCols.get(deleteColRef), deleteCol); | ||
} | ||
} | ||
|
||
fillExtendedColumns(columnRefFactory, newColRefToColBuilder, newColToColRefBuilder, hasPartitionEvolution, noDeleteTable); | ||
|
||
// build new table's predicate |
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.
The most risky bug in this code is:
Potential NullPointerException
when accessing originToNewCols
with deleteColRef
.
You can modify the code like this:
// fill unselected delete columns
for (Map.Entry<ColumnRefOperator, Column> entry : deleteColumns.entrySet()) {
ColumnRefOperator deleteColRef = entry.getKey();
Column deleteCol = entry.getValue();
if (!colRefToColumnMetaMap.containsKey(deleteColRef)) {
ColumnRefOperator newColumnRef = originToNewCols.get(deleteColRef);
if(newColumnRef != null) {
newColRefToColBuilder.put(newColumnRef, deleteCol);
}
}
}
This change ensures that the code checks if originToNewCols.get(deleteColRef)
is not null
before using it, preventing a potential NullPointerException
.
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 15 / 15 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
…yDeleteRewriteRule. (StarRocks#52510) Signed-off-by: stephen <[email protected]> Signed-off-by: zhiminr.ren <[email protected]>
Why I'm doing:
What I'm doing:
Fixes #issue
https://github.com/StarRocks/StarRocksTest/issues/8771
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: