chl-wxp commented on code in PR #5535:
URL: https://github.com/apache/seatunnel/pull/5535#discussion_r1361460317
##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/catalog/Catalog.java:
##########
@@ -125,17 +124,14 @@ default Optional<Factory> getFactory() {
default List<CatalogTable> getTables(ReadonlyConfig config) throws
CatalogException {
// Get the list of specified tables
List<String> tableNames = config.get(CatalogOptions.TABLE_NAMES);
- List<CatalogTable> catalogTables = Collections.synchronizedList(new
ArrayList<>());
- if (CollectionUtils.isNotEmpty(tableNames)) {
- tableNames
- .parallelStream()
- .forEach(
- tableName -> {
- TablePath tablePath = TablePath.of(tableName);
- if (this.tableExists(tablePath)) {
-
catalogTables.add(this.getTable(tablePath));
- }
- });
+ List<CatalogTable> catalogTables = new ArrayList<>();
+ if (tableNames != null && !tableNames.isEmpty()) {
+ for (String tableName : tableNames) {
+ TablePath tablePath = TablePath.of(tableName);
Review Comment:
If you add Parallelstream, it will cause disorder
--
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]