public abstract class SetOp extends AbstractRelNode
SetOp is an abstract base for relational set operators such
as UNION, MINUS (aka EXCEPT), and INTERSECT.| Modifier and Type | Field and Description |
|---|---|
boolean |
all |
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<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.
|
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.
|
boolean |
isKey(ImmutableBitSet columns)
Returns whether the result of this relational expression is uniquely
identified by this columns with the given ordinals.
|
void |
replaceInput(int ordinalInParent,
RelNode p)
Replaces the
ordinalInParentth input. |
accept, accept, childrenAccept, collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getChildExps, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isValid, metadata, onRegister, recomputeDigest, register, sole, toStringprotected com.google.common.collect.ImmutableList<RelNode> inputs
public final SqlKind kind
public final 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 boolean isKey(ImmutableBitSet columns)
RelNodeFor example, if this relational expression is a LogicalTableScan to T(A, B, C, D) whose key is (A, B), then isKey([0, 1]) yields true, and isKey([0]) and isKey([0, 2]) yields false.
isKey in interface RelNodeisKey in class AbstractRelNodecolumns - Ordinals of key columnspublic List<RelNode> getInputs()
RelNodenull.getInputs in interface RelOptNodegetInputs in interface RelNodegetInputs in class AbstractRelNodepublic RelWriter explainTerms(RelWriter pw)
AbstractRelNodesuper.explainTerms, then call the
RelWriterImpl.input(String, RelNode)
and
RelWriterImpl.item(String, Object)
methods for each input and attribute.explainTerms in class AbstractRelNodepw - Plan writerprotected RelDataType deriveRowType()
deriveRowType in class AbstractRelNodepublic boolean isHomogeneous(boolean compareNames)
compareNames - Whether column names are important in the
homogeneity comparisonCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.