public class Cast extends UnaryFieldExpression
FieldExpression
.FieldExpression.StringMode
Modifier and Type | Field and Description |
---|---|
static String |
EXPRESSION_NAME
The "function name" for Cast
|
expression
alias, EMPTY_ARRAY
Constructor and Description |
---|
Cast(FieldExpression expression,
SchemaField.Type type)
Construct a new Cast, casting
expression to type . |
Cast(FieldExpression expression,
SchemaField.Type type,
int scale)
Construct a new Cast, casting
expression to type . |
Cast(FieldExpression expression,
SchemaField.Type type,
String alias)
Construct a new Cast, casting
expression to type . |
Cast(FieldExpression expression,
SchemaField.Type type,
TimeResolution resolution)
Construct a new Cast, casting
expression to type . |
Cast(FieldExpression expression,
SchemaField.Type type,
TimeResolution resolution,
String alias)
Construct a new Cast, casting
expression to type . |
Cast(FieldExpression expression,
TimeResolution resolution)
Construct a new Cast, casting
expression to resolution . |
Cast(FieldExpression expression,
TimeResolution resolution,
String alias)
Construct a new Cast, casting
expression to type . |
Cast(String fieldName,
SchemaField.Type type)
Construct a new Cast, casting
fieldName to type . |
Cast(String fieldName,
SchemaField.Type type,
String alias)
Construct a new Cast, casting
fieldName to type . |
Cast(String fieldName,
TimeResolution resolution)
Construct a new Cast, casting
fieldName to type . |
Cast(String fieldName,
TimeResolution resolution,
String alias)
Construct a new Cast, casting
fieldName to type . |
Modifier and Type | Method and Description |
---|---|
Cast |
clone() |
protected Cast |
clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.
|
TimeResolution |
getDateResolution()
Get the time resolution for date type.
|
int |
getScale()
Get the scale for decimal values.
|
SchemaField.Type |
getType()
Get the type to cast to.
|
SchemaField.Type |
getType(Schema schema)
Resolve the type for this expression.
|
int |
hashCode() |
protected boolean |
parametersEqual(FieldExpression other)
Returns
true if other 's parameters are the same as this . |
void |
setDateResolution(TimeResolution value)
Set the time resolution for date type.
|
void |
setScale(int value)
Set the scale for decimal values.
|
void |
setType(SchemaField.Type type)
Set the type to cast to.
|
protected void |
toString(StringBuilder buffer,
FieldExpression.StringMode mode)
Writes the string representation of this field expression to
buffer . |
equalsIgnoreAlias, getExpression, getFieldName, hasChildren, isConstant, rewrite, rewriteChildren, setExpression
as, containsAlias, copyOf, equals, equalsIgnoreAlias, getAlias, getDefaultAlias, handleFieldExpression, isConstant, quote, rewrite, setAlias, toString, toString
public static final String EXPRESSION_NAME
public Cast(String fieldName, SchemaField.Type type)
fieldName
to type
.public Cast(String fieldName, TimeResolution resolution)
fieldName
to type
.public Cast(String fieldName, SchemaField.Type type, String alias)
fieldName
to type
.public Cast(String fieldName, TimeResolution resolution, String alias)
fieldName
to type
.public Cast(FieldExpression expression, SchemaField.Type type)
expression
to type
.public Cast(FieldExpression expression, SchemaField.Type type, int scale)
expression
to type
.public Cast(FieldExpression expression, TimeResolution resolution)
expression
to resolution
.public Cast(FieldExpression expression, SchemaField.Type type, String alias)
expression
to type
.public Cast(FieldExpression expression, TimeResolution resolution, String alias)
expression
to type
.public Cast(FieldExpression expression, SchemaField.Type type, TimeResolution resolution)
expression
to type
.public Cast(FieldExpression expression, SchemaField.Type type, TimeResolution resolution, String alias)
expression
to type
.public SchemaField.Type getType(Schema schema)
getType
in class FieldExpression
public SchemaField.Type getType()
public void setType(SchemaField.Type type)
public int getScale()
public void setScale(int value)
public TimeResolution getDateResolution()
public void setDateResolution(TimeResolution value)
protected void toString(StringBuilder buffer, FieldExpression.StringMode mode)
buffer
.
NOTE: the alias will not be written to buffer by this function.
toString
in class FieldExpression
public int hashCode()
hashCode
in class UnaryFieldExpression
protected boolean parametersEqual(FieldExpression other)
true
if other
's parameters are the same as this
.parametersEqual
in class UnaryFieldExpression
public Cast clone()
clone
in class UnaryFieldExpression
protected Cast clone(FieldExpression e)
clone
in class UnaryFieldExpression
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.