File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1010import org .elasticsearch .common .io .stream .NamedWriteableRegistry ;
1111import org .elasticsearch .common .io .stream .StreamInput ;
1212import org .elasticsearch .common .io .stream .StreamOutput ;
13+ import org .elasticsearch .license .XPackLicenseState ;
14+ import org .elasticsearch .xpack .esql .LicenseAware ;
1315import org .elasticsearch .xpack .esql .core .expression .Expression ;
1416import org .elasticsearch .xpack .esql .core .expression .Nullability ;
1517import org .elasticsearch .xpack .esql .core .tree .NodeInfo ;
1921import org .elasticsearch .xpack .esql .expression .function .FunctionInfo ;
2022import org .elasticsearch .xpack .esql .expression .function .Param ;
2123import org .elasticsearch .xpack .esql .io .stream .PlanStreamInput ;
24+ import org .elasticsearch .xpack .ml .MachineLearning ;
2225
2326import java .io .IOException ;
2427import java .util .List ;
3538 * For the implementation, see {@link org.elasticsearch.compute.aggregation.blockhash.CategorizeBlockHash}
3639 * </p>
3740 */
38- public class Categorize extends GroupingFunction .NonEvaluatableGroupingFunction {
41+ public class Categorize extends GroupingFunction .NonEvaluatableGroupingFunction implements LicenseAware {
3942 public static final NamedWriteableRegistry .Entry ENTRY = new NamedWriteableRegistry .Entry (
4043 Expression .class ,
4144 "Categorize" ,
@@ -126,4 +129,9 @@ public Expression field() {
126129 public String toString () {
127130 return "Categorize{field=" + field + "}" ;
128131 }
132+
133+ @ Override
134+ public boolean licenseCheck (XPackLicenseState state ) {
135+ return MachineLearning .CATEGORIZE_TEXT_AGG_FEATURE .check (state );
136+ }
129137}
Original file line number Diff line number Diff line change @@ -526,7 +526,7 @@ public class MachineLearning extends Plugin
526526 License .OperationMode .PLATINUM
527527 );
528528
529- private static final LicensedFeature .Momentary CATEGORIZE_TEXT_AGG_FEATURE = LicensedFeature .momentary (
529+ public static final LicensedFeature .Momentary CATEGORIZE_TEXT_AGG_FEATURE = LicensedFeature .momentary (
530530 MachineLearningField .ML_FEATURE_FAMILY ,
531531 "categorize-text-agg" ,
532532 License .OperationMode .PLATINUM
You can’t perform that action at this time.
0 commit comments