public class ReplaceFunction extends Scalar<org.apache.lucene.util.BytesRef,java.lang.Object> implements DynamicFunctionResolver
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
ReplaceFunction(FunctionInfo info) |
Modifier and Type | Method and Description |
---|---|
Scalar<org.apache.lucene.util.BytesRef,java.lang.Object> |
compile(java.util.List<Symbol> arguments)
Returns a optional compiled version of the scalar implementation.
|
org.apache.lucene.util.BytesRef |
evaluate(Input[] args) |
FunctionImplementation<Function> |
getForTypes(java.util.List<DataType> dataTypes)
returns the function implementation for the given types.
|
FunctionInfo |
info() |
Symbol |
normalizeSymbol(Function symbol,
TransactionContext transactionContext)
Normalize a symbol into a simplified form.
|
static void |
register(ScalarFunctionModule module) |
anyNonLiterals, containsNullLiteral
public static final java.lang.String NAME
public ReplaceFunction(FunctionInfo info)
public static void register(ScalarFunctionModule module)
public FunctionInfo info()
info
in interface FunctionImplementation<Function>
public Symbol normalizeSymbol(Function symbol, TransactionContext transactionContext)
FunctionImplementation
normalizeSymbol
in interface FunctionImplementation<Function>
normalizeSymbol
in class Scalar<org.apache.lucene.util.BytesRef,java.lang.Object>
transactionContext
- context which is shared across normalizeSymbol calls during a statement-lifecycle.
This will only be present if normalizeSymbol is called on the handler node.
normalizeSymbol calls during execution won't receive a StmtCtxpublic Scalar<org.apache.lucene.util.BytesRef,java.lang.Object> compile(java.util.List<Symbol> arguments)
Scalar
public org.apache.lucene.util.BytesRef evaluate(Input[] args)
public FunctionImplementation<Function> getForTypes(java.util.List<DataType> dataTypes) throws java.lang.IllegalArgumentException
DynamicFunctionResolver
getForTypes
in interface DynamicFunctionResolver
java.lang.IllegalArgumentException
- thrown if there is no function that can handle the given types.