@Override public boolean equals(Object obj) { if (obj instanceof JoinNode) { JoinNode other = (JoinNode) obj; boolean eq = this.joinSpec.equals(other.joinSpec); eq &= TUtil.checkEquals(this.targets, other.targets); return eq && leftChild.equals(other.leftChild) && rightChild.equals(other.rightChild); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj instanceof JoinNode) { JoinNode other = (JoinNode) obj; boolean eq = this.joinSpec.equals(other.joinSpec); eq &= TUtil.checkEquals(this.targets, other.targets); return eq && leftChild.equals(other.leftChild) && rightChild.equals(other.rightChild); } else { return false; } }
/** * Given two join edges e1 and e2, they are <b>symmetric</b> whey they satisfy the follwing conditions. * * <ul> * <li>e1 and e2 have the same commutative join type.</li> * <li>e1 and e2 have the same join condition.</li> * <li>The left and right vertexes of e1 are the right and left vertexes of e2, respectively.</li> * </ul> * * @param edge1 * @param edge2 * @return True if two join edges are symmetric. */ public static boolean isSymmetric(JoinEdge edge1, JoinEdge edge2) { if (edge1.getLeftVertex().equals(edge2.getRightVertex()) && edge1.getRightVertex().equals(edge2.getLeftVertex()) && edge1.getJoinSpec().equals(edge2.getJoinSpec()) && PlannerUtil.isCommutativeJoinType(edge1.getJoinType())) { return true; } return false; }
/** * Given two join edges e1 and e2, they are <b>symmetric</b> whey they satisfy the follwing conditions. * * <ul> * <li>e1 and e2 have the same commutative join type.</li> * <li>e1 and e2 have the same join condition.</li> * <li>The left and right vertexes of e1 are the right and left vertexes of e2, respectively.</li> * </ul> * * @param edge1 * @param edge2 * @return True if two join edges are symmetric. */ public static boolean isSymmetric(JoinEdge edge1, JoinEdge edge2) { if (edge1.getLeftVertex().equals(edge2.getRightVertex()) && edge1.getRightVertex().equals(edge2.getLeftVertex()) && edge1.getJoinSpec().equals(edge2.getJoinSpec()) && PlannerUtil.isCommutativeJoinType(edge1.getJoinType())) { return true; } return false; }