public class CoerceExpression extends BaseSingleExpression
BaseExpression.ExpressionComparabilityWrapper
children
Constructor and Description |
---|
CoerceExpression() |
CoerceExpression(List<Expression> children,
PDataType toType,
SortOrder toSortOrder,
Integer maxLength,
boolean rowKeyOrderOptimizable) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(ExpressionVisitor<T> visitor)
Means of traversing expression tree through visitor.
|
CoerceExpression |
clone(List<Expression> children) |
static Expression |
create(Expression expression,
PDataType toType) |
static Expression |
create(Expression expression,
PDataType toType,
SortOrder toSortOrder,
Integer maxLength) |
static Expression |
create(Expression expression,
PDataType toType,
SortOrder toSortOrder,
Integer maxLength,
boolean rowKeyOrderOptimizable) |
boolean |
equals(Object obj) |
boolean |
evaluate(Tuple tuple,
ImmutableBytesWritable ptr)
Access the value by setting a pointer to it (as opposed to making
a copy of it which can be expensive)
|
PDataType |
getDataType() |
Integer |
getMaxLength() |
SortOrder |
getSortOrder() |
int |
hashCode() |
void |
readFields(DataInput input) |
String |
toString() |
void |
write(DataOutput output) |
getChild, getChildren, isNullable, requiresFinalEvaluation, reset
acceptChildren, coerce, coerce, getDeterminism, getScale, isStateless
public CoerceExpression()
public CoerceExpression(List<Expression> children, PDataType toType, SortOrder toSortOrder, Integer maxLength, boolean rowKeyOrderOptimizable)
public static Expression create(Expression expression, PDataType toType) throws SQLException
SQLException
public static Expression create(Expression expression, PDataType toType, SortOrder toSortOrder, Integer maxLength) throws SQLException
SQLException
public static Expression create(Expression expression, PDataType toType, SortOrder toSortOrder, Integer maxLength, boolean rowKeyOrderOptimizable) throws SQLException
SQLException
public CoerceExpression clone(List<Expression> children)
public Integer getMaxLength()
getMaxLength
in interface PDatum
getMaxLength
in class BaseExpression
public int hashCode()
hashCode
in class BaseSingleExpression
public boolean equals(Object obj)
equals
in class BaseSingleExpression
public void readFields(DataInput input) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class BaseSingleExpression
IOException
public void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class BaseSingleExpression
IOException
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr)
Expression
tuple
- Single row result during scan iterationptr
- Pointer to byte value being accessedpublic PDataType getDataType()
public SortOrder getSortOrder()
getSortOrder
in interface PDatum
getSortOrder
in class BaseExpression
public <T> T accept(ExpressionVisitor<T> visitor)
Expression
accept
in interface Expression
accept
in class BaseSingleExpression
Copyright © 2017 Apache Software Foundation. All Rights Reserved.