Package org.apache.wayang.core.mapping
Class SubplanPattern
java.lang.Object
org.apache.wayang.core.plan.wayangplan.OperatorBase
org.apache.wayang.core.mapping.SubplanPattern
- All Implemented Interfaces:
Serializable
,Operator
A subplan pattern describes a class of subplans in a
WayangPlan
.
NB: Currently, only such patterns are tested and supported that form a chain of operators, i.e., no DAGs are allowed and at most one input and one output operator.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wayang.core.plan.wayangplan.OperatorBase
OperatorBase.GsonSerializer
-
Field Summary
Fields inherited from class org.apache.wayang.core.plan.wayangplan.OperatorBase
inputSlots, outputSlots, STANDARD_OPERATOR_ARGS
Fields inherited from interface org.apache.wayang.core.plan.wayangplan.Operator
FIRST_EPOCH
-
Method Summary
Modifier and TypeMethodDescription<Payload,
Return>
Returnaccept
(TopDownPlanVisitor<Payload, Return> visitor, OutputSlot<?> outputSlot, Payload payload) This method is part of the visitor pattern and calls the appropriate visit method onvisitor
.static final SubplanPattern
createSingleton
(OperatorPattern operatorPattern) Creates a new instance that matches only a single operator.static final SubplanPattern
fromOperatorPatterns
(OperatorPattern inputOperatorPattern, OperatorPattern outputOperatorPattern) Creates a new instance that matches a graph of operator patterns.match
(WayangPlan plan, int minEpoch) Match this pattern against a plan.Methods inherited from class org.apache.wayang.core.plan.wayangplan.OperatorBase
addBroadcastInput, addTargetPlatform, at, collectMappedInputSlots, collectMappedOutputSlots, copy, createCopy, getAllInputs, getAllOutputs, getCardinalityEstimator, getContainer, getEpoch, getName, getOriginal, getSimpleClassName, getTargetPlatforms, isAuxiliary, isSupportingBroadcastInputs, propagateInputCardinality, propagateOutputCardinality, setAuxiliary, setCardinalityEstimator, setContainer, setEpoch, setName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.wayang.core.plan.wayangplan.Operator
broadcastTo, broadcastTo, connectTo, connectTo, getCardinalityPusher, getEffectiveOccupant, getEffectiveOccupant, getEstimationContextProperties, getForwards, getInnermostLoop, getInput, getInput, getLoopStack, getNumBroadcastInputs, getNumInputs, getNumOutputs, getNumRegularInputs, getOuterInputSlot, getOutermostInputSlot, getOutermostOutputSlots, getOutput, getOutput, getParent, isAlternative, isConversion, isElementary, isExecutionOperator, isFeedbackInput, isFeedforwardOutput, isLoopHead, isLoopSubplan, isOwnerOf, isReading, isSink, isSource, isSubplan, isUnconnected, propagateOutputCardinality, replaceWith, setInput, setOutput
-
Method Details
-
createSingleton
Creates a new instance that matches only a single operator.- Parameters:
operatorPattern
- the only operator pattern- Returns:
- the new instance
-
fromOperatorPatterns
public static final SubplanPattern fromOperatorPatterns(OperatorPattern inputOperatorPattern, OperatorPattern outputOperatorPattern) Creates a new instance that matches a graph of operator patterns.- Parameters:
inputOperatorPattern
- the only operator pattern that has inputs wrt. the subplan patternoutputOperatorPattern
- the only operator pattern that has outputs wrt. the subplan pattern- Returns:
- the new instance
-
match
Match this pattern against a plan.- Parameters:
plan
- the plan to match againstminEpoch
- the (inclusive) minimum epoch value for matched subplans- Returns:
- all matches
-
getInputPattern
-
getOutputPattern
-
accept
public <Payload,Return> Return accept(TopDownPlanVisitor<Payload, Return> visitor, OutputSlot<?> outputSlot, Payload payload) Description copied from interface:Operator
This method is part of the visitor pattern and calls the appropriate visit method onvisitor
.- Specified by:
accept
in interfaceOperator
- Overrides:
accept
in classOperatorBase
-