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, waitprintListpublic Function(org.elasticsearch.common.io.stream.StreamInput in)
throws java.io.IOException
java.io.IOExceptionpublic Function(FunctionInfo info, java.util.List<Symbol> arguments)
public java.util.List<Symbol> arguments()
public FunctionInfo info()
public boolean canBeCasted()
SymbolLiteral,
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 FuncArgcanBeCasted in class Symbolpublic boolean isValueSymbol()
FuncArgisValueSymbol in interface FuncArgpublic Symbol cast(DataType newDataType, boolean tryCast)
SymbolDataType by wrapping a cast function around it.
Sublasses of this class may provide another cast methods.public SymbolType symbolType()
symbolType in class Symbolpublic <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.Writeablejava.io.IOExceptionpublic java.lang.String representation()
representation in interface ExplainLeafpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object