public class RowKeyColumnExpression extends ColumnExpression
BaseExpression.ExpressionComparabilityWrapper
Modifier and Type | Field and Description |
---|---|
protected String |
name |
type
Constructor and Description |
---|
RowKeyColumnExpression() |
RowKeyColumnExpression(PDatum datum,
RowKeyValueAccessor accessor) |
RowKeyColumnExpression(PDatum datum,
RowKeyValueAccessor accessor,
PDataType fromType) |
RowKeyColumnExpression(PDatum datum,
RowKeyValueAccessor accessor,
String name) |
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(ExpressionVisitor<T> visitor)
Means of traversing expression tree through visitor.
|
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)
|
String |
getName() |
int |
getPosition() |
int |
hashCode() |
void |
readFields(DataInput input) |
boolean |
requiresFinalEvaluation()
Since we may never have encountered a key value column of interest, but the
expression may evaluate to true just based on the row key columns, we need
to do a final evaluation.
|
void |
setOffset(int offset)
Used to set an offset to be skipped from the start of a the row key.
|
String |
toString() |
void |
write(DataOutput output) |
getDataType, getMaxLength, getScale, getSortOrder, isNullable
getChildren
acceptChildren, coerce, coerce, getDeterminism, isStateless, reset
protected final String name
public RowKeyColumnExpression()
public RowKeyColumnExpression(PDatum datum, RowKeyValueAccessor accessor)
public RowKeyColumnExpression(PDatum datum, RowKeyValueAccessor accessor, String name)
public RowKeyColumnExpression(PDatum datum, RowKeyValueAccessor accessor, PDataType fromType)
public void setOffset(int offset)
offset
- the number of bytes to offset accesses to row key columnspublic int getPosition()
public String getName()
public int hashCode()
hashCode
in class ColumnExpression
public boolean equals(Object obj)
equals
in class ColumnExpression
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr)
Expression
tuple
- Single row result during scan iterationptr
- Pointer to byte value being accessedpublic void readFields(DataInput input) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
readFields
in class ColumnExpression
IOException
public void write(DataOutput output) throws IOException
write
in interface org.apache.hadoop.io.Writable
write
in class ColumnExpression
IOException
public final <T> T accept(ExpressionVisitor<T> visitor)
Expression
public boolean requiresFinalEvaluation()
requiresFinalEvaluation
in interface Expression
requiresFinalEvaluation
in class BaseExpression
Copyright © 2017 Apache Software Foundation. All Rights Reserved.