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

[cdc-common] add PublicEvolving annotation to SchemaUtils. #2756

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

lvyanquan
Copy link
Contributor

add PublicEvolving annotation to SchemaUtils, add modify code of SchemaManager to reuse the method of SchemaUtils.

@PatrickRen CC.

}

@Override
public int hashCode() {
return Objects.hash(columns, primaryKeys, options, comment, nameToColumns);
return Objects.hash(columns, primaryKeys, options, comment);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove it because it's initialized lazily.

Copy link
Contributor

@PatrickRen PatrickRen left a comment

Choose a reason for hiding this comment

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

@lvyanquan Thanks for the PR! I left some comments.

@@ -32,6 +33,7 @@
import java.util.stream.Collectors;

/** Utils for {@link Schema} to perform the ability of evolution. */
@PublicEvolving
Copy link
Contributor

Choose a reason for hiding this comment

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

As we are promoting this utility to public, I think we need to be careful about the API, so I have concerns about the method applySchemaChangeEvent with parameter ignoreException. I prefer to remove this one, as I can't see any use cases for ignoring exceptions. Currently there's no usage of it, and the warning log is empty if the exception is ignored, which confuses me a bit.

A better behavior would be clearly defining the exception on the method (throws XXXException) and letting the caller catch and handle it.

@lvyanquan
Copy link
Contributor Author

Address it. And XXXException requires unified processing, so just keep to use IllegalArgumentException here.

Copy link
Contributor

@PatrickRen PatrickRen left a comment

Choose a reason for hiding this comment

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

@lvyanquan Thanks for the update! LGTM.

@PatrickRen PatrickRen merged commit 3806c72 into apache:master Nov 28, 2023
e-mhui pushed a commit to e-mhui/flink-cdc-connectors that referenced this pull request Dec 2, 2023
ChaomingZhangCN pushed a commit to ChaomingZhangCN/flink-cdc that referenced this pull request Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants