DanielLeens commented on code in PR #11048:
URL: https://github.com/apache/seatunnel/pull/11048#discussion_r3401595533
##########
seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/MetadataExportCommand.java:
##########
@@ -420,10 +420,14 @@ private ObjectNode exportCondition(Condition<?>
condition) {
}
ObjectNode node = mapper.createObjectNode();
node.put("key", condition.getOption().key());
- if (condition.getExpectValue() != null) {
- node.put("expectValue",
String.valueOf(condition.getExpectValue()));
- }
ConditionOperator op = condition.getOperator();
+ Object expectValue = condition.getExpectValue();
+ if (op == ConditionOperator.EXTENSION && condition.getExtension() !=
null) {
+ expectValue = condition.getExtension().description();
+ }
Review Comment:
Makes sense as a cleanup suggestion. I do see the same small
EXTENSION-to-description mapping pattern here and in OptionRulesService, but on
the unchanged head I would treat that as non-blocking duplication rather than a
correctness issue. If the author wants to refactor it afterward, a tiny shared
helper would be fine.
--
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]