File tree 2 files changed +10
-2
lines changed
esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/grouping
ml/src/main/java/org/elasticsearch/xpack/ml
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11
11
import org .elasticsearch .common .io .stream .StreamInput ;
12
12
import org .elasticsearch .common .io .stream .StreamOutput ;
13
13
import org .elasticsearch .compute .operator .EvalOperator .ExpressionEvaluator ;
14
+ import org .elasticsearch .license .XPackLicenseState ;
15
+ import org .elasticsearch .xpack .esql .LicenseAware ;
14
16
import org .elasticsearch .xpack .esql .core .expression .Expression ;
15
17
import org .elasticsearch .xpack .esql .core .expression .Nullability ;
16
18
import org .elasticsearch .xpack .esql .core .tree .NodeInfo ;
20
22
import org .elasticsearch .xpack .esql .expression .function .FunctionInfo ;
21
23
import org .elasticsearch .xpack .esql .expression .function .Param ;
22
24
import org .elasticsearch .xpack .esql .io .stream .PlanStreamInput ;
25
+ import org .elasticsearch .xpack .ml .MachineLearning ;
23
26
24
27
import java .io .IOException ;
25
28
import java .util .List ;
36
39
* For the implementation, see {@link org.elasticsearch.compute.aggregation.blockhash.CategorizeBlockHash}
37
40
* </p>
38
41
*/
39
- public class Categorize extends GroupingFunction {
42
+ public class Categorize extends GroupingFunction implements LicenseAware {
40
43
public static final NamedWriteableRegistry .Entry ENTRY = new NamedWriteableRegistry .Entry (
41
44
Expression .class ,
42
45
"Categorize" ,
@@ -132,4 +135,9 @@ public Expression field() {
132
135
public String toString () {
133
136
return "Categorize{field=" + field + "}" ;
134
137
}
138
+
139
+ @ Override
140
+ public boolean licenseCheck (XPackLicenseState state ) {
141
+ return MachineLearning .CATEGORIZE_TEXT_AGG_FEATURE .check (state );
142
+ }
135
143
}
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ public class MachineLearning extends Plugin
526
526
License .OperationMode .PLATINUM
527
527
);
528
528
529
- private static final LicensedFeature .Momentary CATEGORIZE_TEXT_AGG_FEATURE = LicensedFeature .momentary (
529
+ public static final LicensedFeature .Momentary CATEGORIZE_TEXT_AGG_FEATURE = LicensedFeature .momentary (
530
530
MachineLearningField .ML_FEATURE_FAMILY ,
531
531
"categorize-text-agg" ,
532
532
License .OperationMode .PLATINUM
You can’t perform that action at this time.
0 commit comments