924060929 commented on code in PR #10176:
URL: https://github.com/apache/incubator-doris/pull/10176#discussion_r898736515
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalBinaryPlan.java:
##########
@@ -39,18 +41,29 @@
implements BinaryPlan<LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE> {
public LogicalBinaryPlan(OP_TYPE operator, LEFT_CHILD_TYPE leftChild,
RIGHT_CHILD_TYPE rightChild) {
- super(NodeType.LOGICAL, operator, leftChild, rightChild);
+ super(NodeType.LOGICAL, operator, Optional.empty(), leftChild,
rightChild);
}
- public LogicalBinaryPlan(OP_TYPE operator, GroupExpression
groupExpression, LogicalProperties logicalProperties,
- LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE rightChild) {
+ public LogicalBinaryPlan(OP_TYPE operator, Optional<LogicalProperties>
logicalProperties,
+ LEFT_CHILD_TYPE leftChild, RIGHT_CHILD_TYPE
rightChild) {
+ super(NodeType.LOGICAL, operator, logicalProperties, leftChild,
rightChild);
+ }
+
+ public LogicalBinaryPlan(OP_TYPE operator, Optional<GroupExpression>
groupExpression,
+ Optional<LogicalProperties> logicalProperties, LEFT_CHILD_TYPE
leftChild, RIGHT_CHILD_TYPE rightChild) {
super(NodeType.LOGICAL, operator, groupExpression, logicalProperties,
leftChild, rightChild);
}
@Override
- public LogicalBinaryPlan<OP_TYPE, Plan, Plan> newChildren(List<Plan>
children) {
+ public LogicalBinaryPlan<OP_TYPE, Plan, Plan> withChildren(List<Plan>
children) {
Preconditions.checkArgument(children.size() == 2);
- return new LogicalBinaryPlan(operator, groupExpression.orElse(null),
- logicalProperties, children.get(0), children.get(1));
+ return new LogicalBinaryPlan(operator, groupExpression,
Optional.empty(),
+ children.get(0), children.get(1));
+ }
+
+ @Override
+ public LogicalBinaryPlan<OP_TYPE, LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE>
withOutput(List<Slot> output) {
+ LogicalProperties logicalProperties = new LogicalProperties(output);
Review Comment:
LogicalLeaf(UnboundRelation).getLogicalProperties() will throw
UnboundException.
So can not invoke getLogicalProperties().withOutput(newOutput);
--
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]