snuyanzin commented on code in PR #28065:
URL: https://github.com/apache/flink/pull/28065#discussion_r3160763250
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/StaticArgument.java:
##########
@@ -367,6 +378,18 @@ private void checkTraits(EnumSet<StaticArgumentTrait>
traits) {
name, trait,
requirement));
}
}));
+ traits.forEach(
+ trait ->
+ trait.getIncompatibleWith()
+ .forEach(
+ incompatible -> {
+ if (traits.contains(incompatible))
{
+ throw new ValidationException(
+ String.format(
+ "Invalid
argument traits for argument '%s'. Trait %s is mutually exclusive with %s.",
+ name, trait,
incompatible));
+ }
+ }));
Review Comment:
this and another snippet above are very similar, can we extract common logic
or at least vars to void heavy formatting?
--
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]