-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
6aaa753
to
4af9cbe
Compare
b9b2deb
to
83c2ab6
Compare
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(columns, primaryKeys, options, comment, nameToColumns); | ||
return Objects.hash(columns, primaryKeys, options, comment); |
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.
remove it because it's initialized lazily.
83c2ab6
to
ded82a4
Compare
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.
@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 |
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.
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.
...time/src/main/java/com/ververica/cdc/runtime/operators/schema/coordinator/SchemaManager.java
Outdated
Show resolved
Hide resolved
Address it. And XXXException requires unified processing, so just keep to use IllegalArgumentException here. |
945e661
to
03dee48
Compare
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.
@lvyanquan Thanks for the update! LGTM.
add PublicEvolving annotation to SchemaUtils, add modify code of SchemaManager to reuse the method of SchemaUtils.
@PatrickRen CC.