EmmyMiao87 commented on code in PR #8947:
URL: https://github.com/apache/incubator-doris/pull/8947#discussion_r853700854
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -133,7 +134,7 @@ abstract public class PlanNode extends TreeNode<PlanNode> {
protected List<SlotId> outputSlotIds;
- private NodeType nodeType = NodeType.DEFAULT;
+ protected NodeType nodeType = NodeType.DEFAULT;
protected StatsDeriveResult statsDeriveResult = new StatsDeriveResult();
protected PlanNode(PlanNodeId id, ArrayList<TupleId> tupleIds, String
planNodeName) {
Review Comment:
```suggestion
protected PlanNode(PlanNodeId id, ArrayList<TupleId> tupleIds, String
planNodeName, NodeType nodeType) {
```
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -133,7 +134,7 @@ abstract public class PlanNode extends TreeNode<PlanNode> {
protected List<SlotId> outputSlotIds;
- private NodeType nodeType = NodeType.DEFAULT;
+ protected NodeType nodeType = NodeType.DEFAULT;
protected StatsDeriveResult statsDeriveResult = new StatsDeriveResult();
Review Comment:
Before entering statistics derivation, ```StatsDeriveResult``` should be
null. It should not be set directly in the constructor.
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -175,26 +176,32 @@ protected PlanNode(PlanNodeId id, PlanNode node, String
planNodeName) {
"V" + planNodeName : planNodeName;
this.numInstances = 1;
this.nodeType = node.getNodeType();
Review Comment:
```suggestion
this.nodeType = nodeType;
```
##########
fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java:
##########
@@ -175,26 +176,32 @@ protected PlanNode(PlanNodeId id, PlanNode node, String
planNodeName) {
"V" + planNodeName : planNodeName;
this.numInstances = 1;
this.nodeType = node.getNodeType();
- this.statsDeriveResult.set(node.getStatsDeriveResult());
+ this.statsDeriveResult = new StatsDeriveResult(
Review Comment:
It should not be set directly in the constructor.
##########
fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java:
##########
@@ -62,8 +62,9 @@ abstract public class ScanNode extends PlanNode {
protected String sortColumn = null;
protected Analyzer analyzer;
- public ScanNode(PlanNodeId id, TupleDescriptor desc, String planNodeName) {
+ public ScanNode(PlanNodeId id, TupleDescriptor desc, String planNodeName,
NodeType nodeType) {
super(id, desc.getId().asList(), planNodeName);
Review Comment:
```suggestion
super(id, desc.getId().asList(), planNodeName, nodeType);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]