Skip to content

Commit

Permalink
[Hotfix][Zeta] Fix LogicalDagGeneratorTest testcase (apache#4401)
Browse files Browse the repository at this point in the history
  • Loading branch information
hailin0 committed Mar 23, 2023
1 parent c6d84c6 commit 4bd0936
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -136,7 +137,7 @@ public Tuple2<CatalogTable, Action> parseTransform(
inputVertices.stream()
.flatMap(Collection::stream)
.map(Tuple2::_2)
.collect(Collectors.toSet());
.collect(Collectors.toCollection(LinkedHashSet::new));
checkProducedTypeEquals(inputActions);
SinkAction<?, ?, ?, ?> sinkAction =
parseSink(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -360,7 +361,10 @@ private void parseTransform(
factoryId,
(factory) -> factory.createTransform(null));

Set<Action> inputActions = inputs.stream().map(Tuple2::_2).collect(Collectors.toSet());
Set<Action> inputActions =
inputs.stream()
.map(Tuple2::_2)
.collect(Collectors.toCollection(LinkedHashSet::new));
SeaTunnelDataType<?> expectedType = getProducedType(inputs.get(0)._2());
checkProducedTypeEquals(inputActions);
int spareParallelism = inputs.get(0)._2().getParallelism();
Expand Down Expand Up @@ -472,7 +476,7 @@ private static <T> T findLast(LinkedHashMap<?, T> map) {
inputVertices.stream()
.flatMap(Collection::stream)
.map(Tuple2::_2)
.collect(Collectors.toSet());
.collect(Collectors.toCollection(LinkedHashSet::new));
checkProducedTypeEquals(inputActions);
Tuple2<CatalogTable, Action> inputActionSample = inputVertices.get(0).get(0);
SinkAction<?, ?, ?, ?> sinkAction =
Expand Down

0 comments on commit 4bd0936

Please sign in to comment.