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
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration representing spool read / write type.Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Spool.TypeHow the spool consumes elements from its input.final Spool.TypeHow the spool forwards elements to consumers.Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSpool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, Spool.Type readType, Spool.Type writeType) Creates a Spool. -
Method Summary
Modifier and TypeMethodDescriptionfinal RelNodecopy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.protected abstract Spoolcopy(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, replaceInputMethods 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, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:RelNodeCreates 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:
copyin interfaceRelNode- Overrides:
copyin 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:AbstractRelNodeDescribes 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:
explainTermsin classSingleRel- Parameters:
pw- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-