jfz commented on code in PR #5230:
URL: https://github.com/apache/iceberg/pull/5230#discussion_r917561856
##########
core/src/main/java/org/apache/iceberg/PropertiesUpdate.java:
##########
@@ -53,18 +55,34 @@ public UpdateProperties set(String key, String value) {
Preconditions.checkNotNull(value, "Value cannot be null");
Preconditions.checkArgument(!removals.contains(key),
"Cannot remove and update the same key: %s", key);
+ Preconditions.checkArgument(!transforms.containsKey(key),
+ "Cannot transform and update the same key: %s", key);
updates.put(key, value);
return this;
}
+ @Override
+ public UpdateProperties transform(String key, Function<String, String>
transformFunc) {
+ Preconditions.checkNotNull(key, "Key cannot be null");
+ Preconditions.checkNotNull(transformFunc, "Transform function cannot be
null");
+ Preconditions.checkArgument(!updates.containsKey(key),
+ "Cannot updates and transform the same key: %s", key);
Review Comment:
Fixed.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]