liugddx commented on code in PR #7677:
URL: https://github.com/apache/seatunnel/pull/7677#discussion_r1764457017
##########
seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/ConfigParserUtil.java:
##########
@@ -175,22 +175,44 @@ private static void checkComplexGraph(
private static void fillVirtualVertices(
List<? extends Config> configs,
- Map<String, Tuple2<Config, VertexStatus>> vertexStatusMap) {
+ Map<String, Tuple2<Config, VertexStatus>> vertexStatusMap,
+ boolean isSource) {
+ Map<String, Tuple2<Config, VertexStatus>> transformVertexStatusMap =
new HashMap<>();
for (Config config : configs) {
- vertexStatusMap.compute(
- config.getString(RESULT_TABLE_NAME.key()),
- (id, old) -> {
- if (old != null) {
- throw new JobDefineCheckException(
- String.format(
- "The value of the '%s' option of
the (%s and %s) plugins is both '%s', and they must be different.",
- RESULT_TABLE_NAME.key(),
-
config.getString(PLUGIN_NAME.key()),
-
old._1().getString(PLUGIN_NAME.key()),
- id));
- }
- return new Tuple2<>(config, VertexStatus.CREATED);
- });
+ String resultTableName = config.getString(RESULT_TABLE_NAME.key());
+
+ if (isSource) {
+ vertexStatusMap.compute(
+ resultTableName,
+ (id, old) -> {
+ if (old != null) {
+ throw new JobDefineCheckException(
+ String.format(
+ "The value of the '%s' option
of the (%s and %s) plugins is both '%s', and they must be different.",
+ RESULT_TABLE_NAME.key(),
+
config.getString(PLUGIN_NAME.key()),
+
old._1().getString(PLUGIN_NAME.key()),
+ id));
+ }
+ return new Tuple2<>(config, VertexStatus.CREATED);
+ });
+ } else {
+ if (vertexStatusMap.containsKey(resultTableName)) {
Review Comment:
Done.
--
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]