-
Notifications
You must be signed in to change notification settings - Fork 411
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
*: fix the origin_default_value
issue in disaggregated mode
#9666
Conversation
origin_default_value
issue in disaggregated modeorigin_default_value
issue in disaggregated mode
PTAL @Lloyd-Pottiger |
if (val.get<Int64>() == 0) | ||
{ | ||
Poco::Dynamic::Var empty_val; | ||
tidb_column_info.origin_default_value = empty_val; | ||
break; | ||
} |
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.
set tidb_column_info.origin_default_value = tipb_column_info.default_val();
if val.get<Int64>() != 0
?
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.
Yes. If we don't do this, after alter table t add column col2 year not null;
, we get this data is 2000
not 0000
.
PTAL @Lloyd-Pottiger |
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
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: JaySon-Huang, Lloyd-Pottiger 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:
|
0c22cb5
to
a81900b
Compare
@zimulala: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests
If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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. |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
…#9683) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Signed-off-by: JaySon-Huang <[email protected]> Co-authored-by: JaySon-Huang <[email protected]> Co-authored-by: JaySon <[email protected]>
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
…#9719) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: JaySon-Huang <[email protected]> Co-authored-by: Lynn <[email protected]> Co-authored-by: JaySon-Huang <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
In response to a cherrypick label: new pull request created to branch |
…#9729) close #9665 Since the TiDB add new column operation does not actually write the new column data, it simply logs it to `origin_default_value`. In disaggregated mode, the default value may be read using tipb passing the default value. The original logic is to pass the default value of tipb to the default value of ColumnInfo (calling defaultValueToField). After obtaining the default value of tipb, decode it, and then use the defaultValueToField value for processing. Co-authored-by: Lynn <[email protected]> Co-authored-by: Lloyd-Pottiger <[email protected]>
What problem does this PR solve?
Issue Number: close #9665
Problem Summary:
What is changed and how it works?
Check List
Tests
Before this PR:
After this PR:
Side effects
Documentation
Release note