Class EsqlFunctionRegistry
java.lang.Object
org.elasticsearch.xpack.esql.expression.function.EsqlFunctionRegistry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceprotected static interfaceprotected static interfaceprotected static interfaceprotected static interfacestatic final recordstatic classstatic final recordprotected static interfaceprotected static interfaceprotected static interfaceprotected static interfaceprotected static interfacestatic interfaceprotected static interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbuildDataTypesForStringLiteralConversion(FunctionDefinition[]... groupFunctions) protected static FunctionDefinitiondef(Class<? extends Function> function, EsqlFunctionRegistry.FunctionBuilder builder, String... names) Main method to register a function.static <T extends Function>
FunctionDefinitiondef(Class<T> function, BiFunction<Source, Expression, T> ctorRef, String... names) Build a FunctionDefinition for a unary function.static <T extends Function>
FunctionDefinitionBuild a FunctionDefinition for a no-argument function.static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.BinaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a binary function.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.BinaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a binary function that is configuration aware.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.BinaryVariadicWithOptionsBuilder<T> ctorRef, String... names) protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.ConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a no-argument function that is configuration aware.protected <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.NaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for multi-arg/n-ary function.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.QuaternaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a quaternary function.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.QuinaryBuilder<T> ctorRef, int numOptionalParams, String... names) Build a FunctionDefinition for a quinary function.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.TernaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a ternary function.protected <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.TernaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a ternary function that is configuration aware.static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.UnaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a one-argument function that is configuration aware.protected static <T extends Function>
FunctionDefinitiondef(Class<T> function, EsqlFunctionRegistry.UnaryVariadicBuilder<T> ctorRef, String... names) Build a FunctionDefinition for functions with a mandatory argument followed by a varidic list.booleanfunctionExists(String functionName) static FunctionInfofunctionName(Class<? extends Function> clazz) getDataTypeForStringLiteralConversion(Class<? extends Function> clazz) static booleanisSnapshotOnly(String functionName) static StringnormalizeName(String name) paramWithoutAnnotation(String name) resolveAlias(String alias) resolveFunction(String functionName)
-
Constructor Details
-
EsqlFunctionRegistry
public EsqlFunctionRegistry()
-
-
Method Details
-
resolveFunction
-
resolveAlias
-
functionExists
-
functionName
-
listFunctions
-
snapshotRegistry
-
isSnapshotOnly
-
normalizeName
-
description
-
param
-
mapParam
-
paramWithoutAnnotation
-
functionInfo
-
getDataTypeForStringLiteralConversion
-
buildDataTypesForStringLiteralConversion
-
def
protected static FunctionDefinition def(Class<? extends Function> function, EsqlFunctionRegistry.FunctionBuilder builder, String... names) Main method to register a function.- Parameters:
names- Must always have at least one entry which is the method's primary name
-
def
public static <T extends Function> FunctionDefinition def(Class<T> function, Function<Source, T> ctorRef, String... names) Build a FunctionDefinition for a no-argument function. -
def
public static <T extends Function> FunctionDefinition def(Class<T> function, BiFunction<Source, Expression, T> ctorRef, String... names) Build a FunctionDefinition for a unary function. -
def
protected <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.NaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for multi-arg/n-ary function. -
def
public static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.BinaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a binary function. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.TernaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a ternary function. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.QuaternaryBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a quaternary function. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.QuinaryBuilder<T> ctorRef, int numOptionalParams, String... names) Build a FunctionDefinition for a quinary function. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.UnaryVariadicBuilder<T> ctorRef, String... names) Build a FunctionDefinition for functions with a mandatory argument followed by a varidic list. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.BinaryVariadicWithOptionsBuilder<T> ctorRef, String... names) -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.ConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a no-argument function that is configuration aware. -
def
public static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.UnaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a one-argument function that is configuration aware. -
def
protected static <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.BinaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a binary function that is configuration aware. -
def
protected <T extends Function> FunctionDefinition def(Class<T> function, EsqlFunctionRegistry.TernaryConfigurationAwareBuilder<T> ctorRef, String... names) Build a FunctionDefinition for a ternary function that is configuration aware.
-