public abstract class Snapshot extends SingleRel implements Hintable
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.Context| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.collect.ImmutableList<RelHint> |
hints |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
Snapshot(RelOptCluster cluster,
RelTraitSet traitSet,
List<RelHint> hints,
RelNode input,
RexNode period)
Creates a Snapshot.
|
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.
|
com.google.common.collect.ImmutableList<RelHint> |
getHints()
Returns the hints of this relational expressions as an immutable list.
|
RexNode |
getPeriod() |
boolean |
isValid(Litmus litmus,
@Nullable 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattachHints, withHintsexplain, fieldIsNullableprotected final com.google.common.collect.ImmutableList<RelHint> hints
protected Snapshot(RelOptCluster cluster, RelTraitSet traitSet, List<RelHint> hints, RelNode input, RexNode period)
cluster - Cluster that this relational expression belongs totraitSet - The traits of this relational expressionhints - Hints for this nodeinput - Input relational expressionperiod - Timestamp expression which as the table was at the given
time in the pastprotected 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
RelWriter.item(String, Object)
methods for each input and attribute.explainTerms in class SingleRelpw - Plan writerpublic RexNode getPeriod()
public boolean isValid(Litmus litmus, @Nullable 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-2022 Apache Software Foundation. All Rights Reserved.