m1a2st commented on code in PR #20334:
URL: https://github.com/apache/kafka/pull/20334#discussion_r2295115557
##########
connect/transforms/src/main/java/org/apache/kafka/connect/transforms/HeaderFrom.java:
##########
@@ -61,11 +61,13 @@ public abstract class HeaderFrom<R extends
ConnectRecord<R>> implements Transfor
public static final ConfigDef CONFIG_DEF = new ConfigDef()
.define(FIELDS_FIELD, ConfigDef.Type.LIST,
- NO_DEFAULT_VALUE, new NonEmptyListValidator(),
+ NO_DEFAULT_VALUE,
+ new NonEmptyListValidator(),
ConfigDef.Importance.HIGH,
"Field names in the record whose values are to be copied
or moved to headers.")
.define(HEADERS_FIELD, ConfigDef.Type.LIST,
- NO_DEFAULT_VALUE, new NonEmptyListValidator(),
+ NO_DEFAULT_VALUE,
+ ConfigDef.ValidList.anyNonDuplicateValues(false, false),
Review Comment:
It seens the `headers` config should allow the dulpicated value, we can see
the testcase. I will updated the KIP.
https://github.com/apache/kafka/blob/eba9839776c07e860c9aa7fe2d028e4f65031d5b/connect/transforms/src/test/java/org/apache/kafka/connect/transforms/HeaderFromTest.java#L251
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]