public class Function extends Symbol implements java.lang.Cloneable
Constructor and Description |
---|
Function(FunctionInfo info,
java.util.List<Symbol> arguments) |
Function(org.elasticsearch.common.io.stream.StreamInput in) |
Modifier and Type | Method and Description |
---|---|
<C,R> R |
accept(SymbolVisitor<C,R> visitor,
C context) |
java.util.List<Symbol> |
arguments() |
boolean |
canBeCasted()
|
Symbol |
cast(DataType newDataType,
boolean tryCast)
Casts this Symbol to a new
DataType by wrapping a cast function around it. |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
FunctionInfo |
info() |
boolean |
isValueSymbol()
Returns true if this Symbol holds a value that may be cast
preferably before other Symbols, ie.
|
java.lang.String |
representation() |
SymbolType |
symbolType() |
DataType |
valueType()
|
void |
writeTo(org.elasticsearch.common.io.stream.StreamOutput out) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
printList
public Function(org.elasticsearch.common.io.stream.StreamInput in) throws java.io.IOException
java.io.IOException
public Function(FunctionInfo info, java.util.List<Symbol> arguments)
public java.util.List<Symbol> arguments()
public FunctionInfo info()
public boolean canBeCasted()
Symbol
Literal
,
Function
,
ParameterSymbol
,
and Symbols whose type is undefined.
The reasoning behind this is that we want to avoid
query Lucene performance to drop due to casts. This
is true for Field
/Reference
.canBeCasted
in interface FuncArg
canBeCasted
in class Symbol
public boolean isValueSymbol()
FuncArg
isValueSymbol
in interface FuncArg
public Symbol cast(DataType newDataType, boolean tryCast)
Symbol
DataType
by wrapping a cast function around it.
Sublasses of this class may provide another cast methods.public SymbolType symbolType()
symbolType
in class Symbol
public <C,R> R accept(SymbolVisitor<C,R> visitor, C context)
public void writeTo(org.elasticsearch.common.io.stream.StreamOutput out) throws java.io.IOException
writeTo
in interface org.elasticsearch.common.io.stream.Writeable
java.io.IOException
public java.lang.String representation()
representation
in interface ExplainLeaf
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object