|
9 | 9 | import org.elasticsearch.common.io.stream.NamedWriteableRegistry; |
10 | 10 | import org.elasticsearch.common.io.stream.StreamInput; |
11 | 11 | import org.elasticsearch.common.io.stream.StreamOutput; |
12 | | -import org.elasticsearch.search.aggregations.bucket.sampler.random.RandomSamplingQuery; |
13 | | -import org.elasticsearch.xpack.esql.capabilities.PostAnalysisVerificationAware; |
14 | 12 | import org.elasticsearch.xpack.esql.capabilities.TelemetryAware; |
15 | | -import org.elasticsearch.xpack.esql.common.Failures; |
16 | 13 | import org.elasticsearch.xpack.esql.core.expression.Expression; |
17 | | -import org.elasticsearch.xpack.esql.core.expression.FoldContext; |
18 | | -import org.elasticsearch.xpack.esql.core.expression.Foldables; |
19 | 14 | import org.elasticsearch.xpack.esql.core.tree.NodeInfo; |
20 | 15 | import org.elasticsearch.xpack.esql.core.tree.Source; |
21 | 16 | import org.elasticsearch.xpack.esql.io.stream.PlanStreamInput; |
22 | 17 |
|
23 | 18 | import java.io.IOException; |
24 | 19 | import java.util.Objects; |
25 | 20 |
|
26 | | -import static org.elasticsearch.xpack.esql.common.Failure.fail; |
27 | | - |
28 | | -public class Sample extends UnaryPlan implements TelemetryAware, PostAnalysisVerificationAware { |
| 21 | +public class Sample extends UnaryPlan implements TelemetryAware { |
29 | 22 | public static final NamedWriteableRegistry.Entry ENTRY = new NamedWriteableRegistry.Entry(LogicalPlan.class, "Sample", Sample::new); |
30 | 23 |
|
31 | 24 | private final Expression probability; |
@@ -92,13 +85,4 @@ public boolean equals(Object obj) { |
92 | 85 |
|
93 | 86 | return Objects.equals(probability, other.probability) && Objects.equals(child(), other.child()); |
94 | 87 | } |
95 | | - |
96 | | - @Override |
97 | | - public void postAnalysisVerification(Failures failures) { |
98 | | - try { |
99 | | - RandomSamplingQuery.checkProbabilityRange((double) Foldables.valueOf(FoldContext.small(), probability)); |
100 | | - } catch (IllegalArgumentException e) { |
101 | | - failures.add(fail(probability, e.getMessage())); |
102 | | - } |
103 | | - } |
104 | 88 | } |
0 commit comments