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
[Improve](mysqlSync)Add the configuration of whether to synchronize the default value #152
Conversation
@@ -57,6 +57,8 @@ private static void createMySQLSyncDatabase(String[] opArgs) throws Exception { | |||
String tableSuffix = params.get("table-suffix"); | |||
String includingTables = params.get("including-tables"); | |||
String excludingTables = params.get("excluding-tables"); | |||
boolean ignoreDefaultValue = | |||
Boolean.parseBoolean(params.get("ignore-default-value", "false")); |
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.
params.has is better?
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.
Thanks for your suggestion, I have fixed it.
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
Proposed changes
At present, when the mysql database sync to doris , there is a default value in the field, but the actual data is null, the data cannot maintain consistency.
Like: when mysql schema has a default value and the insertion is
null
, the data synchronized to doris uses the default value.Configure
--ignore-default-value
, the default value will not be synchronized, otherwise it will be synchronized.Problem Summary:
Describe the overview of changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...