Package org.apache.gravitino.function
Interface FunctionChange
- All Known Implementing Classes:
FunctionChange.AddDefinition,FunctionChange.AddImpl,FunctionChange.RemoveDefinition,FunctionChange.RemoveImpl,FunctionChange.UpdateComment,FunctionChange.UpdateImpl
Represents a change that can be applied to a function.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAFunctionChangeto add a new definition to a function.static final classAFunctionChangeto add an implementation to a definition.static final classAFunctionChangeto remove an existing definition from a function.static final classAFunctionChangeto remove an implementation for a specific runtime.static final classAFunctionChangeto update the comment of a function.static final classAFunctionChangeto replace an implementation (identified by runtime) for a specific definition. -
Field Summary
Fields -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic FunctionChangeaddDefinition(FunctionDefinition definition) Create aFunctionChangeto add a new definition (overload) to a function.static FunctionChangeaddImpl(FunctionParam[] parameters, FunctionImpl implementation) Create aFunctionChangeto add an implementation to a specific definition.static FunctionChangeremoveDefinition(FunctionParam[] parameters) Create aFunctionChangeto remove an existing definition (overload) from a function.static FunctionChangeremoveImpl(FunctionParam[] parameters, FunctionImpl.RuntimeType runtime) Create aFunctionChangeto remove an implementation for a specific definition and runtime.static FunctionChangeupdateComment(String newComment) Create aFunctionChangeto update the comment of a function.static FunctionChangeupdateImpl(FunctionParam[] parameters, FunctionImpl.RuntimeType runtime, FunctionImpl implementation) Create aFunctionChangeto update an implementation for a specific definition and runtime.
-
Field Details
-
EMPTY_PARAMS
An empty array of parameters.
-
-
Method Details
-
updateComment
Create aFunctionChangeto update the comment of a function.- Parameters:
newComment- The new comment value.- Returns:
- The change instance.
-
addDefinition
Create aFunctionChangeto add a new definition (overload) to a function.- Parameters:
definition- The new definition to add.- Returns:
- The change instance.
-
removeDefinition
Create aFunctionChangeto remove an existing definition (overload) from a function.- Parameters:
parameters- The parameters that identify the definition to remove.- Returns:
- The change instance.
-
addImpl
Create aFunctionChangeto add an implementation to a specific definition.- Parameters:
parameters- The parameters that identify the definition to update.implementation- The implementation to add.- Returns:
- The change instance.
-
updateImpl
static FunctionChange updateImpl(FunctionParam[] parameters, FunctionImpl.RuntimeType runtime, FunctionImpl implementation) Create aFunctionChangeto update an implementation for a specific definition and runtime.- Parameters:
parameters- The parameters that identify the definition to update.runtime- The runtime that identifies the implementation to replace.implementation- The new implementation.- Returns:
- The change instance.
-
removeImpl
Create aFunctionChangeto remove an implementation for a specific definition and runtime.- Parameters:
parameters- The parameters that identify the definition to update.runtime- The runtime that identifies the implementation to remove.- Returns:
- The change instance.
-