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 2828
2929public class SampleOperator implements Operator {
3030
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 ;
3235
3336 public Factory (double probability ) {
3437 this (probability , null );
3538 }
3639
40+ // visible for testing
41+ Factory (double probability , Integer seed ) {
42+ this .probability = probability ;
43+ this .seed = seed ;
44+ }
45+
3746 @ Override
3847 public SampleOperator get (DriverContext driverContext ) {
3948 return new SampleOperator (probability , seed == null ? Randomness .get ().nextInt () : seed );
You can’t perform that action at this time.
0 commit comments