Skip to content

ESQL: Improve license checks #117405

@costin

Description

@costin

In some cases, certain functionality (functions, commands, etc..) requires certain licensing before submitting the query.
Currently this is implemented through Function#checkLicense which unfortunately restricts this checks to functions only.
This can be improved by adding a specialized interface that relevant Functions, command, etc.. can implement when needed:

public interface LicenseAware {
     boolean licenseCheck(XPackLicenseState state) {}
}

Furthermore the relevant check can be early, right after parsing to avoid unnecessary index calls.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions