Skip to content
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]Separate the record and schema-change in JsonDebeziumSchemaSerializer #279

Merged
merged 5 commits into from
Jan 3, 2024

Conversation

DongLiang-0
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

Problem Summary:

The original JsonDebeziumSchemaSerializer contains two serialization logics: record and schema change, which makes the entire JsonDebeziumSchemaSerializer code logic particularly confusing and complex, and the maintenance cost is high.

Now record and schema change are separated into JsonDebeziumRecord and JsonDebeziumSchemaChange.
There are two versions of schema implementation in JsonDebeziumSchemaChange. One is the old version(JsonDebeziumSchemaChangeImpl), which has limited support for schema change in actual business; the other is a new version(JsonDebeziumSchemaChangeImplV2), which supports newer versions and can support multi-column changes and field renaming.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

Further comments

If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...

@DongLiang-0 DongLiang-0 changed the title [Improve]Separate the record and schema in JsonDebeziumSchemaSerializer [Improve]Separate the record and schema-change in JsonDebeziumSchemaSerializer Dec 21, 2023
@JNSimba
Copy link
Member

JNSimba commented Dec 25, 2023

It seems that many JsonDebezium related classes have been added. Would it be better to create a separate package below?

@DongLiang-0 DongLiang-0 force-pushed the record-schema branch 3 times, most recently from 6b915e6 to 223f870 Compare December 26, 2023 04:10
@JNSimba
Copy link
Member

JNSimba commented Dec 27, 2023

Please also rebase the master to run the latest workflow. Thanks

@DongLiang-0
Copy link
Contributor Author

Please also rebase the master to run the latest workflow. Thanks

Thanks for your suggestion, just done.

@JNSimba
Copy link
Member

JNSimba commented Jan 3, 2024

Thanks Dongliang, can you add ITCase to the function of automatically adding tables? like this https://github.com/apache/doris-flink-connector/blob/master/flink-doris-connector/src/test/java/org/apache/doris/flink/tools/cdc/MySQLDorisE2ECase.java

@DongLiang-0
Copy link
Contributor Author

Thanks Dongliang, can you add ITCase to the function of automatically adding tables? like this https://github.com/apache/doris-flink-connector/blob/master/flink-doris-connector/src/test/java/org/apache/doris/flink/tools/cdc/MySQLDorisE2ECase.java

Thanks for your suggestion, in the last commit, I have added.

Copy link
Member

@JNSimba JNSimba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JNSimba JNSimba merged commit c7f2f2b into apache:master Jan 3, 2024
8 checks passed
@JNSimba JNSimba mentioned this pull request Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants