public class ResidualEvaluator
extends java.lang.Object
implements java.io.Serializable
Expression
the partitions in the given PartitionSpec
.
A residual expression is made by partially evaluating an expression using partition values. For example, if a table is partitioned by day(utc_timestamp) and is read with a filter expression utc_timestamp >= a and utc_timestamp <= b, then there are 4 possible residuals expressions for the partition data, d:
Partition data is passed using StructLike
. Residuals are returned by residualFor(StructLike)
.
This class is thread-safe.
Modifier and Type | Method and Description |
---|---|
static ResidualEvaluator |
of(PartitionSpec spec,
Expression expr,
boolean caseSensitive)
Return a residual evaluator for a
spec and expression . |
Expression |
residualFor(StructLike partitionData)
Returns a residual expression for the given partition values.
|
static ResidualEvaluator |
unpartitioned(Expression expr)
Return a residual evaluator for an unpartitioned
spec . |
public static ResidualEvaluator unpartitioned(Expression expr)
spec
.expr
- an expressionpublic static ResidualEvaluator of(PartitionSpec spec, Expression expr, boolean caseSensitive)
spec
and expression
.spec
- a partition specexpr
- an expressionpublic Expression residualFor(StructLike partitionData)
partitionData
- partition data values