public abstract class BaseExpression extends Object implements Expression
Modifier and Type | Class and Description |
---|---|
static interface |
BaseExpression.ExpressionComparabilityWrapper |
Constructor and Description |
---|
BaseExpression() |
Modifier and Type | Method and Description |
---|---|
protected <T> List<T> |
acceptChildren(ExpressionVisitor<T> visitor,
Iterator<Expression> iterator) |
static Expression |
coerce(Expression lhs,
Expression rhs,
BaseExpression.ExpressionComparabilityWrapper wrapper,
boolean rowKeyOrderOptimizable) |
static Expression |
coerce(Expression lhs,
Expression rhs,
CompareFilter.CompareOp op,
boolean rowKeyOrderOptimizable)
Coerce the RHS to match the LHS type, throwing if the types are incompatible.
|
Determinism |
getDeterminism() |
Integer |
getMaxLength() |
Integer |
getScale() |
SortOrder |
getSortOrder() |
boolean |
isNullable() |
boolean |
isStateless() |
void |
readFields(DataInput input) |
boolean |
requiresFinalEvaluation()
Determines if an evaluate is required after partial evaluation
is run.
|
void |
reset()
Resets the state of a expression back to its initial state and
enables the expession to be evaluated incrementally (which
occurs during filter evaluation where we see one key value at
a time; it's possible to evaluate immediately rather than
wait until all key values have been seen).
|
void |
write(DataOutput output) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
accept, evaluate, getChildren
getDataType
public static Expression coerce(Expression lhs, Expression rhs, CompareFilter.CompareOp op, boolean rowKeyOrderOptimizable) throws SQLException
lhs
- left hand side expressionrhs
- right hand side expressionop
- operator being used to compare the expressions, which can affect rounding we may need to do.rowKeyOrderOptimizable
- SQLException
public static Expression coerce(Expression lhs, Expression rhs, BaseExpression.ExpressionComparabilityWrapper wrapper, boolean rowKeyOrderOptimizable) throws SQLException
SQLException
public boolean isNullable()
isNullable
in interface PDatum
public Integer getMaxLength()
getMaxLength
in interface PDatum
public Integer getScale()
public SortOrder getSortOrder()
getSortOrder
in interface PDatum
public void readFields(DataInput input) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void reset()
Expression
reset
in interface Expression
protected final <T> List<T> acceptChildren(ExpressionVisitor<T> visitor, Iterator<Expression> iterator)
public Determinism getDeterminism()
getDeterminism
in interface Expression
public boolean isStateless()
isStateless
in interface Expression
SequenceResultIterator
,
but otherwise the Tuple may be null.public boolean requiresFinalEvaluation()
Expression
requiresFinalEvaluation
in interface Expression
Copyright © 2019 Apache Software Foundation. All Rights Reserved.