morrySnow commented on code in PR #12127: URL: https://github.com/apache/doris/pull/12127#discussion_r956597319
########## fe/fe-core/src/test/java/org/apache/doris/nereids/trees/plans/PlanEqualsTest.java: ########## @@ -48,193 +49,259 @@ import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import java.util.ArrayList; import java.util.List; import java.util.Optional; -// TODO: need more detailed test public class PlanEqualsTest { /* *************************** Logical *************************** */ @Test public void testLogicalAggregate(@Mocked Plan child) { - List<Expression> groupByExprList = Lists.newArrayList(); List<NamedExpression> outputExpressionList = ImmutableList.of( - new SlotReference("a", new BigIntType(), true, Lists.newArrayList()) - ); - - LogicalAggregate one = new LogicalAggregate(groupByExprList, outputExpressionList, child); - Assertions.assertEquals(one, one); + new SlotReference(new ExprId(0), "a", new BigIntType(), true, Lists.newArrayList())); + LogicalAggregate<Plan> logicalAggregate = new LogicalAggregate<>(Lists.newArrayList(), outputExpressionList, Review Comment: we could use `actual`, `expected` and `unexpected` as their names ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/physical/AbstractPhysicalJoin.java: ########## @@ -89,13 +88,15 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AbstractPhysicalJoin that = (AbstractPhysicalJoin) o; - return joinType == that.joinType && Objects.equals(otherJoinCondition, that.otherJoinCondition); + AbstractPhysicalJoin<?, ?> that = (AbstractPhysicalJoin<?, ?>) o; + return joinType == that.joinType && hashJoinConjuncts.equals(that.hashJoinConjuncts) + && otherJoinCondition.equals( + that.otherJoinCondition); Review Comment: ```suggestion && otherJoinCondition.equals(that.otherJoinCondition); ``` ########## fe/fe-core/src/main/java/org/apache/doris/nereids/memo/GroupExpression.java: ########## @@ -69,10 +69,9 @@ public GroupExpression(Plan plan, List<Group> children) { this.requestPropertiesMap = Maps.newHashMap(); } - // TODO: rename - public PhysicalProperties getPropertyFromMap(PhysicalProperties requiredPropertySet) { - PhysicalProperties outputProperty = requestPropertiesMap.get(requiredPropertySet); - Preconditions.checkState(outputProperty != null); + public PhysicalProperties getOutputProperty(PhysicalProperties requestProperty) { + PhysicalProperties outputProperty = requestPropertiesMap.get(requestProperty); Review Comment: we'd better to use plural uniformly, e.g. properties -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org