-
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
[Enhancement] Partial update support const expr #50287
Conversation
@@ -675,7 +679,7 @@ Status RowsetUpdateState::_resolve_conflict_auto_increment(const RowsetUpdateSta | |||
auto_increment_read_column.resize(1); | |||
auto_increment_read_column[0] = _auto_increment_partial_update_states[segment_id].write_column->clone_empty(); | |||
RETURN_IF_ERROR(params.tablet->update_mgr()->get_column_values( | |||
params, column_id, new_rows > 0, rowids_by_rssid, &auto_increment_read_column, | |||
params, column_id, new_rows > 0, rowids_by_rssid, &auto_increment_read_column, &_column_to_expr_value, | |||
&_auto_increment_partial_update_states[segment_id])); | |||
|
|||
std::unique_ptr<Column> new_write_column = |
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:
Potentially missing initialization or improper handling of _column_to_expr_value
You can modify the code like this:
@@ -328,6 +328,7 @@ Status RowsetUpdateState::_prepare_auto_increment_partial_update_states(uint32_t
}
+ _column_to_expr_value.clear(); // Ensure it's empty before usage
RETURN_IF_ERROR(params.tablet->update_mgr()->get_column_values(params, column_id, new_rows > 0, rowids_by_rssid,
&read_column, &_column_to_expr_value,
&_auto_increment_partial_update_states[segment_id]));
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
dc7400c
to
2447cfc
Compare
Signed-off-by: sevev <[email protected]>
f4bf8ed
to
5f5a6fa
Compare
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Signed-off-by: sevev <[email protected]>
Quality Gate passedIssues Measures |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 4 / 4 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 67 / 76 (88.16%) file detail
|
@Mergifyio backport branch-3.3 |
@Mergifyio backport branch-3.2 |
✅ Backports have been created
|
✅ Backports have been created
|
Signed-off-by: sevev <[email protected]> (cherry picked from commit 18ba78e)
Signed-off-by: sevev <[email protected]> (cherry picked from commit 18ba78e) # Conflicts: # be/src/runtime/lake_tablets_channel.cpp # be/src/runtime/local_tablets_channel.h # be/src/storage/lake/async_delta_writer.cpp # be/src/storage/lake/async_delta_writer.h # be/src/storage/lake/delta_writer.cpp # be/src/storage/lake/delta_writer.h # be/src/storage/rowset/rowset_writer_context.h # fe/fe-core/src/main/java/com/starrocks/planner/OlapTableSink.java
Signed-off-by: sevev <[email protected]>
…0860) Co-authored-by: zhangqiang <[email protected]>
…0861) Signed-off-by: sevev <[email protected]> Co-authored-by: zhangqiang <[email protected]>
Signed-off-by: sevev <[email protected]> Signed-off-by: zhiminr.ren <[email protected]>
Why I'm doing:
Partial update does not support expression currently. If an expression column is not specified in the update, we will fill it with the default value instead of calculating it based on the expression.
What I'm doing:
Support partial update with expr and we only support default expr can be calculated like
now()
and does not support the expr for a batch of every row different likeuuid()
. If the default expr isuuid()
, the behavior is not changed.e.g.
before this pr, the result is
after this pr:
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: