File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/operator Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 28
28
29
29
public class SampleOperator implements Operator {
30
30
31
- public record Factory (double probability , Integer seed ) implements OperatorFactory {
31
+ public static class Factory implements OperatorFactory {
32
+
33
+ private final double probability ;
34
+ private final Integer seed ;
32
35
33
36
public Factory (double probability ) {
34
37
this (probability , null );
35
38
}
36
39
40
+ // visible for testing
41
+ Factory (double probability , Integer seed ) {
42
+ this .probability = probability ;
43
+ this .seed = seed ;
44
+ }
45
+
37
46
@ Override
38
47
public SampleOperator get (DriverContext driverContext ) {
39
48
return new SampleOperator (probability , seed == null ? Randomness .get ().nextInt () : seed );
You can’t perform that action at this time.
0 commit comments