-
Notifications
You must be signed in to change notification settings - Fork 14k
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
KAFKA-17650: validate ReplaceField config #17247
base: trunk
Are you sure you want to change the base?
Conversation
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.
@TaiJuWu, Thanks for your PR, I left some comments, PTAL
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/ReplaceField.java
Outdated
Show resolved
Hide resolved
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/ReplaceField.java
Outdated
Show resolved
Hide resolved
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/ReplaceField.java
Outdated
Show resolved
Hide resolved
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
@TaiJuWu Could you please file a jira as it is a kind of bug |
Done. Updated in title and post, thanks! |
@TaiJuWu why we need this changes? the other fields have no such checks. |
I noticed the check in the client-side module and believe it could also be applied to the connect module. |
that is a kind of behavior change. We need KIP if it is necessary improvement. |
@@ -72,6 +73,10 @@ interface ConfigName { | |||
.define(ConfigName.REPLACE_NULL_WITH_DEFAULT_CONFIG, ConfigDef.Type.BOOLEAN, true, ConfigDef.Importance.MEDIUM, | |||
"Whether to replace fields that have a default value and that are null to the default value. When set to true, the default value is used, otherwise null is used."); | |||
|
|||
private static Set<String> configNames() { |
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.
I note that ConfigName.RENAME
actually has the value "renames"
so it probably should be ConfigName.RENAMES
. This probably ought to be resolved.
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.
@TaiJuWu Maybe you can file a minor PR to fix the naming. this PR needs more discussion due to behavior change.
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.
@TaiJuWu Maybe you can file a minor PR to fix the naming. this PR needs more discussion due to behavior change.
Will do, thanks for helping check.
jira: https://issues.apache.org/jira/browse/KAFKA-17650
There is no validation of ReplaceField, we should add it.
Committer Checklist (excluded from commit message)