public abstract class SetOp extends AbstractRelNode implements Hintable
SetOp is an abstract base for relational set operators such
as UNION, MINUS (aka EXCEPT), and INTERSECT.RelNode.Context| Modifier and Type | Field and Description |
|---|---|
boolean |
all |
protected com.google.common.collect.ImmutableList<RelHint> |
hints |
protected com.google.common.collect.ImmutableList<RelNode> |
inputs |
SqlKind |
kind |
digest, id, rowType, traitSet| Modifier | Constructor and Description |
|---|---|
protected |
SetOp(RelInput input)
Creates a SetOp by parsing serialized output.
|
protected |
SetOp(RelOptCluster cluster,
RelTraitSet traits,
List<RelHint> hints,
List<RelNode> inputs,
SqlKind kind,
boolean all)
Creates a SetOp.
|
protected |
SetOp(RelOptCluster cluster,
RelTraitSet traits,
List<RelNode> inputs,
SqlKind kind,
boolean all)
Creates a SetOp.
|
| Modifier and Type | Method and Description |
|---|---|
SetOp |
copy(RelTraitSet traitSet,
List<RelNode> inputs)
Creates a copy of this relational expression, perhaps changing traits and
inputs.
|
abstract SetOp |
copy(RelTraitSet traitSet,
List<RelNode> inputs,
boolean all) |
protected RelDataType |
deriveRowType() |
RelWriter |
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.
|
com.google.common.collect.ImmutableList<RelHint> |
getHints()
Returns the hints of this relational expressions as an immutable list.
|
List<RelNode> |
getInputs()
Returns an array of this relational expression's inputs.
|
boolean |
isHomogeneous(boolean compareNames)
Returns whether all the inputs of this set operator have the same row
type as its output row.
|
void |
replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParentth input. |
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeSelfCost, deepEquals, deepHashCode, equals, estimateRowCount, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitattachHints, withHintsexplain, fieldIsNullableprotected com.google.common.collect.ImmutableList<RelNode> inputs
public final SqlKind kind
public final boolean all
protected final com.google.common.collect.ImmutableList<RelHint> hints
protected SetOp(RelOptCluster cluster, RelTraitSet traits, List<RelHint> hints, List<RelNode> inputs, SqlKind kind, boolean all)
protected SetOp(RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, SqlKind kind, boolean all)
protected SetOp(RelInput input)
public abstract SetOp copy(RelTraitSet traitSet, List<RelNode> inputs, boolean all)
public SetOp copy(RelTraitSet traitSet, List<RelNode> inputs)
RelNodeSub-classes with other important attributes are encouraged to create variants of this method with more parameters.
copy in interface RelNodecopy in class AbstractRelNodetraitSet - Trait setinputs - Inputspublic void replaceInput(int ordinalInParent,
RelNode p)
RelNodeordinalInParentth input. You must
override this method if you override RelNode.getInputs().replaceInput in interface RelNodereplaceInput in class AbstractRelNodeordinalInParent - Position of the child input, 0 is the firstp - New node that should be put at position ordinalInParentpublic List<RelNode> getInputs()
RelNodenull.getInputs in interface RelOptNodegetInputs in interface RelNodegetInputs in class AbstractRelNodepublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriter.input(String, RelNode)
and
RelWriter.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerprotected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic com.google.common.collect.ImmutableList<RelHint> getHints()
Hintablepublic boolean isHomogeneous(boolean compareNames)
compareNames - Whether column names are important in the
homogeneity comparisonCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.