Skip to content

Commit

Permalink
iter
Browse files Browse the repository at this point in the history
  • Loading branch information
iverase committed Nov 13, 2024
1 parent 249d905 commit 1c91551
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ public void testLicense() {
final LicensedFeature functionLicenseFeature = random().nextBoolean()
? LicensedFeature.momentary("test", "dummy", functionLicense)
: LicensedFeature.persistent("test", "dummy", functionLicense);
final EsqlFunctionRegistry.FunctionBuilder builder = (source, expression, cfg) -> new DummyAggregateFunction(
final EsqlFunctionRegistry.FunctionBuilder builder = (source, expression, cfg) -> new DummyFunction(
source,
expression,
functionLicenseFeature
);
for (License.OperationMode operationMode : License.OperationMode.values()) {
Expand All @@ -64,7 +63,7 @@ public void testLicense() {
}

private LogicalPlan analyze(EsqlFunctionRegistry.FunctionBuilder builder, License.OperationMode operationMode) {
final FunctionDefinition def = EsqlFunctionRegistry.def(DummyAggregateFunction.class, builder, "dummy");
final FunctionDefinition def = EsqlFunctionRegistry.def(DummyFunction.class, builder, "dummy");
final EsqlFunctionRegistry registry = new EsqlFunctionRegistry(def) {
@Override
public EsqlFunctionRegistry snapshotRegistry() {
Expand All @@ -87,12 +86,12 @@ private static XPackLicenseState getLicenseState(License.OperationMode operation
return licenseState;
}

private static class DummyAggregateFunction extends Function {
private static class DummyFunction extends Function {

private final LicensedFeature licensedFeature;

protected DummyAggregateFunction(Source source, List<Expression> children, LicensedFeature licensedFeature) {
super(source, children);
private DummyFunction(Source source, LicensedFeature licensedFeature) {
super(source, List.of());
this.licensedFeature = licensedFeature;
}

Expand Down

0 comments on commit 1c91551

Please sign in to comment.