Search before asking
Description
|
public List<TablePath> getSinkTables() { |
|
|
|
List<TablePath> tablePaths = new ArrayList<>(); |
|
List<SeaTunnelSink> values = new ArrayList<>(sinks.values()); |
|
for (int i = 0; i < values.size(); i++) { |
|
if (values.get(i).getWriteCatalogTable().isPresent()) { |
|
tablePaths.add( |
|
((CatalogTable) values.get(i).getWriteCatalogTable().get()).getTablePath()); |
|
} else { |
|
tablePaths.add(sinks.keySet().toArray(new TablePath[0])[i]); |
|
} |
|
} |
|
return tablePaths; |
|
} |
It would be safer and clearer to iterate over entrySet() directly to ensure correct key-value association.
Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Search before asking
Description
seatunnel/seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableSink.java
Lines 168 to 181 in e5fb01f
It would be safer and clearer to iterate over
entrySet()directly to ensure correct key-value association.Usage Scenario
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct