Class DeviceViewNode
- java.lang.Object
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.ProcessNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.process.DeviceViewNode
-
- All Implemented Interfaces:
org.apache.iotdb.consensus.common.request.IConsensusRequest
public class DeviceViewNode extends MultiChildNode
DeviceViewNode is responsible for constructing a device-based view of a set of series. And output the result with specific order. The order could be 'order by device' or 'order by timestamp'Each output from its children should have the same schema. That means, the columns should be same between these TsBlocks. If the input TsBlock contains n columns, the device-based view will contain n+1 columns where the new column is Device column.
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
children
-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
CHILD_COUNT_NO_LIMIT, NO_CHILD_ALLOWED, ONE_CHILD
-
-
Constructor Summary
Constructors Constructor Description DeviceViewNode(PlanNodeId id, OrderByParameter mergeOrderParameter, java.util.List<java.lang.String> outputColumnNames, java.util.List<java.lang.String> devices, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> deviceToMeasurementIndexesMap)DeviceViewNode(PlanNodeId id, OrderByParameter mergeOrderParameter, java.util.List<java.lang.String> outputColumnNames, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> deviceToMeasurementIndexesMap)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(PlanVisitor<R,C> visitor, C context)voidaddChild(PlanNode child)voidaddChildDeviceNode(java.lang.String deviceName, PlanNode childNode)intallowedChildCount()PlanNodeclone()static DeviceViewNodedeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object o)java.util.List<PlanNode>getChildren()java.util.List<java.lang.String>getDevices()java.util.Map<java.lang.String,java.util.List<java.lang.Integer>>getDeviceToMeasurementIndexesMap()OrderByParametergetMergeOrderParameter()java.util.List<java.lang.String>getOutputColumnNames()inthashCode()protected voidserializeAttributes(java.io.DataOutputStream stream)protected voidserializeAttributes(java.nio.ByteBuffer byteBuffer)java.lang.StringtoString()-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.process.MultiChildNode
setChildren
-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
cloneWithChildren, getPlanNodeId, serialize, serialize, serializeToByteBuffer, setPlanNodeId
-
-
-
-
Constructor Detail
-
DeviceViewNode
public DeviceViewNode(PlanNodeId id, OrderByParameter mergeOrderParameter, java.util.List<java.lang.String> outputColumnNames, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> deviceToMeasurementIndexesMap)
-
DeviceViewNode
public DeviceViewNode(PlanNodeId id, OrderByParameter mergeOrderParameter, java.util.List<java.lang.String> outputColumnNames, java.util.List<java.lang.String> devices, java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> deviceToMeasurementIndexesMap)
-
-
Method Detail
-
addChildDeviceNode
public void addChildDeviceNode(java.lang.String deviceName, PlanNode childNode)
-
getDevices
public java.util.List<java.lang.String> getDevices()
-
getDeviceToMeasurementIndexesMap
public java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> getDeviceToMeasurementIndexesMap()
-
getChildren
public java.util.List<PlanNode> getChildren()
- Specified by:
getChildrenin classPlanNode
-
allowedChildCount
public int allowedChildCount()
- Specified by:
allowedChildCountin classPlanNode
-
getMergeOrderParameter
public OrderByParameter getMergeOrderParameter()
-
getOutputColumnNames
public java.util.List<java.lang.String> getOutputColumnNames()
- Specified by:
getOutputColumnNamesin classPlanNode
-
accept
public <R,C> R accept(PlanVisitor<R,C> visitor, C context)
-
serializeAttributes
protected void serializeAttributes(java.nio.ByteBuffer byteBuffer)
- Specified by:
serializeAttributesin classPlanNode
-
serializeAttributes
protected void serializeAttributes(java.io.DataOutputStream stream) throws java.io.IOException- Specified by:
serializeAttributesin classPlanNode- Throws:
java.io.IOException
-
deserialize
public static DeviceViewNode deserialize(java.nio.ByteBuffer byteBuffer)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classMultiChildNode
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMultiChildNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-