|
8 | 8 |
|
9 | 9 | import org.elasticsearch.common.io.stream.StreamOutput; |
10 | 10 | import org.elasticsearch.compute.operator.ChangePointOperator; |
| 11 | +import org.elasticsearch.license.XPackLicenseState; |
| 12 | +import org.elasticsearch.xpack.esql.LicenseAware; |
11 | 13 | import org.elasticsearch.xpack.esql.capabilities.PostAnalysisVerificationAware; |
12 | 14 | import org.elasticsearch.xpack.esql.common.Failures; |
13 | 15 | import org.elasticsearch.xpack.esql.core.expression.Attribute; |
|
19 | 21 | import org.elasticsearch.xpack.esql.core.type.DataType; |
20 | 22 | import org.elasticsearch.xpack.esql.expression.NamedExpressions; |
21 | 23 | import org.elasticsearch.xpack.esql.expression.Order; |
| 24 | +import org.elasticsearch.xpack.ml.MachineLearning; |
22 | 25 |
|
23 | 26 | import java.io.IOException; |
24 | 27 | import java.util.List; |
|
38 | 41 | * Furthermore, ChangePoint should be called with at most 1000 data points. That's |
39 | 42 | * enforced by the Limit in the surrogate plan. |
40 | 43 | */ |
41 | | -public class ChangePoint extends UnaryPlan implements SurrogateLogicalPlan, PostAnalysisVerificationAware { |
| 44 | +public class ChangePoint extends UnaryPlan implements SurrogateLogicalPlan, PostAnalysisVerificationAware, LicenseAware { |
42 | 45 |
|
43 | 46 | private final Attribute value; |
44 | 47 | private final Attribute key; |
@@ -153,4 +156,9 @@ public void postAnalysisVerification(Failures failures) { |
153 | 156 | failures.add(fail(this, "change point value [" + value.name() + "] must be numeric")); |
154 | 157 | } |
155 | 158 | } |
| 159 | + |
| 160 | + @Override |
| 161 | + public boolean licenseCheck(XPackLicenseState state) { |
| 162 | + return MachineLearning.CHANGE_POINT_AGG_FEATURE.check(state); |
| 163 | + } |
156 | 164 | } |
0 commit comments