public abstract class Snapshot extends SingleRel
For example, if Products is a temporal table, and
TableScan(Products) is a relational operator that returns all
versions of the contents of the table, then
Snapshot(TableScan(Products)) is a relational operator that only
returns the contents whose versions that overlap with the given specific
period (i.e. those that started before given period and ended after it).
RelNode.Contextdigest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
Snapshot(RelOptCluster cluster,
RelTraitSet traitSet,
RelNode input,
RexNode period)
Creates a Snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
accept(RexShuttle shuttle)
Accepts a visit from a shuttle.
|
RelNode |
copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
abstract Snapshot |
copy(RelTraitSet traitSet,
RelNode input,
RexNode period) |
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
RexNode |
getPeriod() |
boolean |
isValid(Litmus litmus,
RelNode.Context context)
Returns whether this relational expression is valid.
|
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInputaccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toStringprotected Snapshot(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, RexNode period)
cluster - Cluster that this relational expression belongs totraitSet - The traits of this relational expressioninput - Input relational expressionperiod - Timestamp expression which as the table was at the given
time in the pastpublic final RelNode copy(RelTraitSet traitSet, List<RelNode> inputs)
RelNodeSub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy in interface RelNodecopy in class AbstractRelNodetraitSet - Trait setinputs - Inputspublic abstract Snapshot copy(RelTraitSet traitSet, RelNode input, RexNode period)
public RelNode accept(RexShuttle shuttle)
RelNodeaccept in interface RelNodeaccept in class AbstractRelNodeshuttle - Shuttlepublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriter.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class SingleRelpw - Plan writerpublic RexNode getPeriod()
public boolean isValid(Litmus litmus, RelNode.Context context)
RelNodeIf assertions are enabled, this method is typically called with
litmus = THROW, as follows:
assert rel.isValid(Litmus.THROW)
This signals that the method can throw an AssertionError if it
is not valid.
isValid in interface RelNodeisValid in class AbstractRelNodelitmus - What to do if invalidcontext - Context for validity checkingCopyright © 2012-2020 Apache Software Foundation. All Rights Reserved.