dybyte commented on code in PR #10592:
URL: https://github.com/apache/seatunnel/pull/10592#discussion_r2932427976
##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigValidator.java:
##########
@@ -124,14 +135,22 @@ private List<Option<?>> getAbsentOptions(List<Option<?>>
requiredOption) {
return absent;
}
- void validate(RequiredOption.AbsolutelyRequiredOptions requiredOption) {
+ void validate(RequiredOption.AbsolutelyRequiredOptions requiredOption,
Expression expression) {
List<Option<?>> absentOptions =
getAbsentOptions(requiredOption.getRequiredOption());
if (absentOptions.size() == 0) {
return;
}
throw new OptionValidationException(
- "There are unconfigured options, the options(%s) are
required.",
- getOptionKeys(absentOptions));
+ "There are unconfigured options, the options(%s) are
required%s",
+ getOptionKeys(absentOptions),
getExpressionExceptionHintMessage(expression));
+ }
Review Comment:
I see that `expression` is only applied to `AbsolutelyRequiredOptions`. Is
this intended, or should we also apply it to other `RequiredOption` types for
consistency?
--
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]