-
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] Keep update statement output column's type consistent with target table's columns #41969
[BugFix] Keep update statement output column's type consistent with target table's columns #41969
Conversation
Signed-off-by: shuming.li <ming.moriarty@gmail.com>
1714d02
to
afd6fd5
Compare
Column column = targetTable.getColumn(colName); | ||
Preconditions.checkState(column != null, "Column %s not found in table %s", colName, | ||
targetTable.getName()); | ||
if (!column.getType().matchesType(outputColumn.getType())) { |
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.
check the type can cast to target type?
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.
Add it. But this should not happen since it will fail in the analyzer phase.
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.
Add more tests.
Quality Gate passedIssues Measures |
[FE Incremental Coverage Report]❌ fail : 27 / 36 (75.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
@mergify backport branch-3.1 |
✅ Backports have been created
|
…ent with target table's columns (backport StarRocks#41969) (StarRocks#42187) Link: https://code.alibaba-inc.com/soe/starrocks/codereview/15895066
…ent with target table's columns (backport StarRocks#41969) (StarRocks#42115) Co-authored-by: shuming.li <ming.moriarty@gmail.com>
…ent with target table's columns (backport StarRocks#41969) (StarRocks#42115) Co-authored-by: shuming.li <ming.moriarty@gmail.com>
…ent with target table's columns (backport StarRocks#41969) (StarRocks#42187) Link: https://code.alibaba-inc.com/soe/starrocks/codereview/15895066
Why I'm doing:
What I'm doing:
castOutputColumnsTypeToTargetColumns
in LogicalPlan to OptExpression likeInsertPlanner
.Fixes #issue
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: