Class Uncollect

  • All Implemented Interfaces:
    java.lang.Cloneable, RelOptNode, RelNode
    Direct Known Subclasses:

    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 extra ORDINALITY column.

    Like its inverse operation Collect, Uncollect is generally invoked in a nested loop, driven by LogicalCorrelate or similar.

    • Field Detail

      • withOrdinality

        public final boolean withOrdinality
    • 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.

        traitSet - Trait set
        input - Input relational expression
        withOrdinality - Whether output should contain an ORDINALITY column
      • 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 interface RelNode
        copy in class AbstractRelNode
        traitSet - Trait set
        inputs - Inputs
        Copy of this relational expression, substituting traits and inputs
      • 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.