Package org.apache.calcite.rel.core
Class SetOp
java.lang.Object
org.apache.calcite.rel.AbstractRelNode
org.apache.calcite.rel.core.SetOp
- All Implemented Interfaces:
- Cloneable,- RelOptNode,- Hintable,- RelNode
SetOp is an abstract base for relational set operators such
 as UNION, MINUS (aka EXCEPT), and INTERSECT.- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.calcite.rel.RelNodeRelNode.Context
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal booleanprotected final com.google.common.collect.ImmutableList<RelHint>protected com.google.common.collect.ImmutableList<RelNode>final SqlKindFields inherited from class org.apache.calcite.rel.AbstractRelNodedigest, id, rowType, traitSet
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedSetOp(RelOptCluster cluster, RelTraitSet traits, List<RelHint> hints, List<RelNode> inputs, SqlKind kind, boolean all) Creates a SetOp.protectedSetOp(RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, SqlKind kind, boolean all) Creates a SetOp.protectedCreates a SetOp by parsing serialized output.
- 
Method SummaryModifier and TypeMethodDescriptioncopy(RelTraitSet traitSet, List<RelNode> inputs) Creates a copy of this relational expression, perhaps changing traits and inputs.abstract SetOpcopy(RelTraitSet traitSet, List<RelNode> inputs, boolean all) protected RelDataTypeDescribes 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.Returns an array of this relational expression's inputs.booleanisHomogeneous(boolean compareNames) Returns whether all the inputs of this set operator have the same row type as its output row.voidreplaceInput(int ordinalInParent, RelNode p) Replaces theordinalInParentth input.Methods inherited from class org.apache.calcite.rel.AbstractRelNodeaccept, 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, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.calcite.rel.hint.HintableattachHints, withHintsMethods inherited from interface org.apache.calcite.rel.RelNodeexplain, fieldIsNullable, stripped
- 
Field Details- 
inputs
- 
kind
- 
allpublic final boolean all
- 
hints
 
- 
- 
Constructor Details- 
SetOpprotected SetOp(RelOptCluster cluster, RelTraitSet traits, List<RelHint> hints, List<RelNode> inputs, SqlKind kind, boolean all) Creates a SetOp.
- 
SetOpprotected SetOp(RelOptCluster cluster, RelTraitSet traits, List<RelNode> inputs, SqlKind kind, boolean all) Creates a SetOp.
- 
SetOpCreates a SetOp by parsing serialized output.
 
- 
- 
Method Details- 
copy
- 
copyDescription 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 interface- RelNode
- Overrides:
- copyin class- AbstractRelNode
- Parameters:
- traitSet- Trait set
- inputs- Inputs
- Returns:
- Copy of this relational expression, substituting traits and inputs
 
- 
replaceInputDescription copied from interface:RelNodeReplaces theordinalInParentth input. You must override this method if you overrideRelNode.getInputs().- Specified by:
- replaceInputin interface- RelNode
- Overrides:
- replaceInputin class- AbstractRelNode
- Parameters:
- ordinalInParent- Position of the child input, 0 is the first
- p- New node that should be put at position- ordinalInParent
 
- 
getInputsDescription copied from interface:RelNodeReturns an array of this relational expression's inputs. If there are no inputs, returns an empty list, notnull.- Specified by:
- getInputsin interface- RelNode
- Specified by:
- getInputsin interface- RelOptNode
- Overrides:
- getInputsin class- AbstractRelNode
- Returns:
- Array of this relational expression's inputs
 
- 
explainTermsDescription 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 class- AbstractRelNode
- Parameters:
- pw- Plan writer
- Returns:
- Plan writer for fluent-explain pattern
 
- 
deriveRowType- Overrides:
- deriveRowTypein class- AbstractRelNode
 
- 
getHintsDescription copied from interface:HintableReturns the hints of this relational expressions as an immutable list.
- 
isHomogeneouspublic boolean isHomogeneous(boolean compareNames) Returns whether all the inputs of this set operator have the same row type as its output row.- Parameters:
- compareNames- Whether column names are important in the homogeneity comparison
- Returns:
- Whether all the inputs of this set operator have the same row type as its output row
 
 
-