Skip to content

Commit 62de767

Browse files
committed
ThreadLocalRandom -> SplittableRandom
1 parent 1d2697e commit 62de767

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBooleanAggregator.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleBytesRefAggregator.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleDoubleAggregator.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleIntAggregator.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/compute/src/main/generated-src/org/elasticsearch/compute/aggregation/SampleLongAggregator.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/aggregation/X-SampleAggregator.java.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import org.elasticsearch.compute.operator.topn.DefaultUnsortableTopNEncoder;
2525
import org.elasticsearch.core.Releasables;
2626
import org.elasticsearch.search.sort.SortOrder;
2727

28-
import java.util.concurrent.ThreadLocalRandom;
28+
import java.util.SplittableRandom;
2929

3030
/**
3131
* Sample N field values for $type$.
@@ -127,7 +127,7 @@ class Sample$Type$Aggregator {
127127

128128
public void add(int groupId, $type$ value) {
129129
try (BreakingBytesRefBuilder builder = new BreakingBytesRefBuilder(breaker, "sample")) {
130-
ENCODER.encodeLong(ThreadLocalRandom.current().nextLong(), builder);
130+
ENCODER.encodeLong(new SplittableRandom().nextLong(), builder);
131131
ENCODER.encode$Type$(value, builder);
132132
sort.collect(builder.bytesRefView(), groupId);
133133
}

0 commit comments

Comments
 (0)