public class DataStreamRetractionRules extends Object
DataStreamRel
nodes with retraction information.
The rules have to be applied in the following order:
- DataStreamRetractionRules.DEFAULT_RETRACTION_INSTANCE
- DataStreamRetractionRules.UPDATES_AS_RETRACTION_INSTANCE
- DataStreamRetractionRules.ACCMODE_INSTANCE
The rules will assign a AccModeTrait
to each DataStreamRel
node of the plan. The
trait defines the AccMode
a node.
- AccMode.Acc
defines that the node produces only accumulate messages, i.e., all types of
modifications (insert, update, delete) are encoded as accumulate messages.
- AccMode.AccRetract
defines that the node produces accumulate and retraction messages.
Insert modifications are encoded as accumulate message, delete modifications as retraction
message, and update modifications as a pair of accumulate and retraction messages.
Modifier and Type | Class and Description |
---|---|
static class |
DataStreamRetractionRules.AssignDefaultRetractionRule
Rule that assigns the default retraction information to
DataStreamRel nodes. |
static class |
DataStreamRetractionRules.SetAccModeRule
Sets the
AccMode of DataStreamRel nodes. |
static class |
DataStreamRetractionRules.SetUpdatesAsRetractionRule
Rule that annotates all
DataStreamRel nodes that need to sent out update changes with
retraction messages. |
Constructor and Description |
---|
DataStreamRetractionRules() |
Modifier and Type | Method and Description |
---|---|
static DataStreamRetractionRules.SetAccModeRule |
ACCMODE_INSTANCE()
Rule instance that assigns the
AccMode to DataStreamRel nodes. |
static DataStreamRetractionRules.AssignDefaultRetractionRule |
DEFAULT_RETRACTION_INSTANCE()
Rule instance that assigns default retraction to
DataStreamRel nodes. |
static scala.collection.Seq<org.apache.calcite.rel.RelNode> |
getChildRelNodes(org.apache.calcite.rel.RelNode parent)
Get all children RelNodes of a RelNode.
|
static boolean |
isAccRetract(org.apache.calcite.rel.RelNode node)
Checks if a
RelNode is in AccMode.AccRetract mode. |
static boolean |
sendsUpdatesAsRetraction(org.apache.calcite.rel.RelNode node)
Checks if a
RelNode ships updates as retractions. |
static DataStreamRetractionRules.SetUpdatesAsRetractionRule |
UPDATES_AS_RETRACTION_INSTANCE()
Rule instance that checks if
DataStreamRel nodes need to ship updates as retractions. |
public static DataStreamRetractionRules.AssignDefaultRetractionRule DEFAULT_RETRACTION_INSTANCE()
DataStreamRel
nodes.public static DataStreamRetractionRules.SetUpdatesAsRetractionRule UPDATES_AS_RETRACTION_INSTANCE()
DataStreamRel
nodes need to ship updates as retractions.public static DataStreamRetractionRules.SetAccModeRule ACCMODE_INSTANCE()
AccMode
to DataStreamRel
nodes.public static scala.collection.Seq<org.apache.calcite.rel.RelNode> getChildRelNodes(org.apache.calcite.rel.RelNode parent)
parent
- The parent RelNodepublic static boolean sendsUpdatesAsRetraction(org.apache.calcite.rel.RelNode node)
RelNode
ships updates as retractions.
node
- The node to check.public static boolean isAccRetract(org.apache.calcite.rel.RelNode node)
RelNode
is in AccMode.AccRetract
mode.node
- (undocumented)Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.