Class Uncollect
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.SingleRel
-
- org.apache.calcite.rel.core.Uncollect
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
- Direct Known Subclasses:
EnumerableUncollect
public class Uncollect extends SingleRel
Relational expression that unnests its input's columns into a relation.The input may have multiple columns, but each must be a multiset or array. If
withOrdinality
, the output contains an extraORDINALITY
column.Like its inverse operation
Collect
, Uncollect is generally invoked in a nested loop, driven byLogicalCorrelate
or similar.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
Fields Modifier and Type Field Description boolean
withOrdinality
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
-
Constructor Summary
Constructors Constructor Description Uncollect(RelOptCluster cluster, RelTraitSet traitSet, RelNode child)
Deprecated.Uncollect(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, boolean withOrdinality)
Creates an Uncollect.Uncollect(RelInput input)
Creates an Uncollect by parsing serialized output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelNode
copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and inputs.RelNode
copy(RelTraitSet traitSet, RelNode input)
static Uncollect
create(RelTraitSet traitSet, RelNode input, boolean withOrdinality)
Creates an Uncollect.protected RelDataType
deriveRowType()
static RelDataType
deriveUncollectRowType(RelNode rel, boolean withOrdinality)
Returns the row type returned by applying the 'UNNEST' operation to a relational expression.RelWriter
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.-
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, estimateRowCount, getInput, getInputs, replaceInput
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
accept, accept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesSet, getVariablesStopped, isDistinct, isKey, isValid, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Constructor Detail
-
Uncollect
@Deprecated public Uncollect(RelOptCluster cluster, RelTraitSet traitSet, RelNode child)
Deprecated.
-
Uncollect
public Uncollect(RelOptCluster cluster, RelTraitSet traitSet, RelNode input, boolean withOrdinality)
Creates an Uncollect.Use
create(org.apache.calcite.plan.RelTraitSet, org.apache.calcite.rel.RelNode, boolean)
unless you know what you're doing.
-
Uncollect
public Uncollect(RelInput input)
Creates an Uncollect by parsing serialized output.
-
-
Method Detail
-
create
public static Uncollect create(RelTraitSet traitSet, RelNode input, boolean withOrdinality)
Creates an Uncollect.Each field of the input relational expression must be an array or multiset.
- Parameters:
traitSet
- Trait setinput
- Input relational expressionwithOrdinality
- Whether output should contain an ORDINALITY column
-
explainTerms
public RelWriter explainTerms(RelWriter pw)
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriterImpl.input(String, RelNode)
andRelWriterImpl.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classSingleRel
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-
copy
public final RelNode copy(RelTraitSet traitSet, java.util.List<RelNode> inputs)
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
public RelNode copy(RelTraitSet traitSet, RelNode input)
-
deriveRowType
protected RelDataType deriveRowType()
- Overrides:
deriveRowType
in classSingleRel
-
deriveUncollectRowType
public static RelDataType deriveUncollectRowType(RelNode rel, boolean withOrdinality)
Returns the row type returned by applying the 'UNNEST' operation to a relational expression.Each column in the relational expression must be a multiset of structs or an array. The return type is the type of that column, plus an ORDINALITY column if
withOrdinality
.
-
-