Skip to content

Commit ac45904

Browse files
committed
use linked hashmap
Signed-off-by: xinyual <xinyual@amazon.com>
1 parent 3b0afb8 commit ac45904

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/src/main/java/org/opensearch/sql/planner/physical/DedupeOperator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.google.common.collect.ImmutableList;
99
import java.util.Collections;
10+
import java.util.LinkedHashMap;
1011
import java.util.List;
1112
import java.util.Map;
1213
import java.util.concurrent.ConcurrentHashMap;
@@ -131,7 +132,7 @@ public boolean keep(ExprValue value) {
131132
@RequiredArgsConstructor
132133
static class Deduper<K> {
133134
private final BiFunction<Map<K, Integer>, K, Integer> seenFirstTime;
134-
private final Map<K, Integer> seenMap = new ConcurrentHashMap<>();
135+
private final Map<K, Integer> seenMap = new LinkedHashMap<>();
135136

136137
/** The Historical Deduper monitor the duplicated element with all the seen value. */
137138
public static <K> Deduper<K> historicalDeduper() {

0 commit comments

Comments
 (0)