Package org.apache.calcite.rel.core
Class Spool
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.SingleRel
org.apache.calcite.rel.core.Spool
- All Implemented Interfaces:
Cloneable
,RelOptNode
,RelNode
- Direct Known Subclasses:
TableSpool
Relational expression that iterates over its input and, in addition to
returning its results, will forward them into other consumers.
NOTE: The current API is experimental and subject to change without notice.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration representing spool read / write type.Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
Field Summary
Modifier and TypeFieldDescriptionfinal Spool.Type
How the spool consumes elements from its input.final Spool.Type
How the spool forwards elements to consumers.Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
Constructor Summary
ModifierConstructorDescriptionprotected
Spool
(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, Spool.Type readType, Spool.Type writeType) Creates a Spool. -
Method Summary
Modifier and TypeMethodDescriptionfinal RelNode
copy
(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.protected abstract Spool
copy
(RelTraitSet traitSet, RelNode input, Spool.Type readType, Spool.Type writeType) Describes the inputs and attributes of this relational expression.Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, estimateRowCount, getInput, getInputs, replaceInput
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeSelfCost, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.RelNode
explain, fieldIsNullable, stripped
-
Field Details
-
readType
How the spool consumes elements from its input.- EAGER: the spool consumes the elements from its input at once at the initial request;
- LAZY: the spool consumes the elements from its input one by one by request.
-
writeType
How the spool forwards elements to consumers.- EAGER: the spool forwards each element as soon as it returns it;
- LAZY: the spool forwards all elements at once when it is done returning all of them.
-
-
Constructor Details
-
Spool
protected Spool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, Spool.Type readType, Spool.Type writeType) Creates a Spool.
-
-
Method Details
-
copy
Description copied from interface:RelNode
Creates a copy of this relational expression, perhaps changing traits and inputs.Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.
- Specified by:
copy
in interfaceRelNode
- Overrides:
copy
in classAbstractRelNode
- Parameters:
traitSet
- Trait setinputs
- Inputs- Returns:
- Copy of this relational expression, substituting traits and inputs
-
copy
protected abstract Spool copy(RelTraitSet traitSet, RelNode input, Spool.Type readType, Spool.Type writeType) -
explainTerms
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriter.input(String, RelNode)
andRelWriter.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classSingleRel
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-