public abstract class Snapshot
extends org.apache.calcite.rel.SingleRel
implements org.apache.calcite.rel.hint.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).
Temporarily copy from calcite to cherry-pick [CALCITE-5251] and will be removed when upgrade to caclite-1.32.0.
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
hints |
Modifier | Constructor and Description |
---|---|
protected |
Snapshot(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.hint.RelHint> hints,
org.apache.calcite.rel.RelNode input,
org.apache.calcite.rex.RexNode period)
Creates a Snapshot.
|
protected |
Snapshot(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode input,
org.apache.calcite.rex.RexNode period)
Creates a Snapshot.
|
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.rel.RelNode |
accept(org.apache.calcite.rex.RexShuttle shuttle) |
org.apache.calcite.rel.RelNode |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs) |
abstract Snapshot |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode input,
org.apache.calcite.rex.RexNode period) |
org.apache.calcite.rel.RelWriter |
explainTerms(org.apache.calcite.rel.RelWriter pw) |
com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
getHints() |
org.apache.calcite.rex.RexNode |
getPeriod() |
boolean |
isValid(org.apache.calcite.util.Litmus litmus,
org.apache.calcite.rel.RelNode.Context context) |
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
accept, 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, toString
protected final com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> hints
protected Snapshot(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.hint.RelHint> hints, org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.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(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.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 org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelNode> inputs)
copy
in interface org.apache.calcite.rel.RelNode
copy
in class org.apache.calcite.rel.AbstractRelNode
public abstract Snapshot copy(org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.RexNode period)
public org.apache.calcite.rel.RelNode accept(org.apache.calcite.rex.RexShuttle shuttle)
accept
in interface org.apache.calcite.rel.RelNode
accept
in class org.apache.calcite.rel.AbstractRelNode
public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
explainTerms
in class org.apache.calcite.rel.SingleRel
public org.apache.calcite.rex.RexNode getPeriod()
public boolean isValid(org.apache.calcite.util.Litmus litmus, org.apache.calcite.rel.RelNode.Context context)
isValid
in interface org.apache.calcite.rel.RelNode
isValid
in class org.apache.calcite.rel.AbstractRelNode
public com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> getHints()
getHints
in interface org.apache.calcite.rel.hint.Hintable
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.