public PlanNode removeFromParent() { this.modified = true; PlanNode result = this.parent; if (result != null) { result.removeChild(this); } return result; }
public PlanNode removeFromParent() { this.modified = true; PlanNode result = this.parent; if (result != null) { result.removeChild(this); } return result; }
public PlanNode removeFromParent() { this.modified = true; PlanNode result = this.parent; if (result != null) { result.removeChild(this); } return result; }
/** * all of child's children become children of parent */ public static final void removeChildNode(PlanNode parent, PlanNode child) { if (child.getChildCount() == 0) { parent.removeChild(child); } else if (child.getChildCount() == 1){ PlanNode grandChild = child.getFirstChild(); parent.replaceChild(child, grandChild); } else { throw new AssertionError("Cannot promote a multinode child"); //$NON-NLS-1$ } }
/** * all of child's children become children of parent */ public static final void removeChildNode(PlanNode parent, PlanNode child) { if (child.getChildCount() == 0) { parent.removeChild(child); } else if (child.getChildCount() == 1){ PlanNode grandChild = child.getFirstChild(); parent.replaceChild(child, grandChild); } else { throw new AssertionError("Cannot promote a multinode child"); //$NON-NLS-1$ } }
/** * all of child's children become children of parent */ public static final void removeChildNode(PlanNode parent, PlanNode child) { if (child.getChildCount() == 0) { parent.removeChild(child); } else if (child.getChildCount() == 1){ PlanNode grandChild = child.getFirstChild(); parent.replaceChild(child, grandChild); } else { throw new AssertionError("Cannot promote a multinode child"); //$NON-NLS-1$ } }
parent.removeChild(joinRoot);
parent.removeChild(joinRoot);
parent.removeChild(joinRoot);
private PlanNode raiseNullNode(PlanNode rootNode, PlanNode parentNode, PlanNode nullNode, List<PlanNode> nodes) { if (parentNode.getType() == NodeConstants.Types.SOURCE) { nullNode.getGroups().clear(); } else if (parentNode.getType() == NodeConstants.Types.PROJECT) { nullNode.setProperty(NodeConstants.Info.PROJECT_COLS, parentNode.getProperty(NodeConstants.Info.PROJECT_COLS)); } nullNode.addGroups(parentNode.getGroups()); parentNode.removeChild(nullNode); nodes.removeAll(NodeEditor.findAllNodes(parentNode, NodeConstants.Types.NULL)); if (parentNode.getParent() != null) { parentNode.getParent().replaceChild(parentNode, nullNode); } else { rootNode = nullNode; } return rootNode; }
private PlanNode raiseNullNode(PlanNode rootNode, PlanNode parentNode, PlanNode nullNode, List<PlanNode> nodes) { if (parentNode.getType() == NodeConstants.Types.SOURCE) { nullNode.getGroups().clear(); } else if (parentNode.getType() == NodeConstants.Types.PROJECT) { nullNode.setProperty(NodeConstants.Info.PROJECT_COLS, parentNode.getProperty(NodeConstants.Info.PROJECT_COLS)); } nullNode.addGroups(parentNode.getGroups()); parentNode.removeChild(nullNode); nodes.removeAll(NodeEditor.findAllNodes(parentNode, NodeConstants.Types.NULL)); if (parentNode.getParent() != null) { parentNode.getParent().replaceChild(parentNode, nullNode); } else { rootNode = nullNode; } return rootNode; }
private PlanNode raiseNullNode(PlanNode rootNode, PlanNode parentNode, PlanNode nullNode, List<PlanNode> nodes) { if (parentNode.getType() == NodeConstants.Types.SOURCE) { nullNode.getGroups().clear(); } else if (parentNode.getType() == NodeConstants.Types.PROJECT) { nullNode.setProperty(NodeConstants.Info.PROJECT_COLS, parentNode.getProperty(NodeConstants.Info.PROJECT_COLS)); } nullNode.addGroups(parentNode.getGroups()); parentNode.removeChild(nullNode); nodes.removeAll(NodeEditor.findAllNodes(parentNode, NodeConstants.Types.NULL)); if (parentNode.getParent() != null) { parentNode.getParent().replaceChild(parentNode, nullNode); } else { rootNode = nullNode; } return rootNode; }
/** * @param joinNode */ static void swapJoinChildren(PlanNode joinNode) { PlanNode leftChild = joinNode.getFirstChild(); joinNode.removeChild(leftChild); joinNode.addLastChild(leftChild); List leftExpressions = (List)joinNode.getProperty(NodeConstants.Info.LEFT_EXPRESSIONS); List rightExpressions = (List)joinNode.getProperty(NodeConstants.Info.RIGHT_EXPRESSIONS); joinNode.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, rightExpressions); joinNode.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, leftExpressions); JoinType jt = (JoinType)joinNode.getProperty(NodeConstants.Info.JOIN_TYPE); joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, jt.getReverseType()); }
/** * @param joinNode */ static void swapJoinChildren(PlanNode joinNode) { PlanNode leftChild = joinNode.getFirstChild(); joinNode.removeChild(leftChild); joinNode.addLastChild(leftChild); List leftExpressions = (List)joinNode.getProperty(NodeConstants.Info.LEFT_EXPRESSIONS); List rightExpressions = (List)joinNode.getProperty(NodeConstants.Info.RIGHT_EXPRESSIONS); joinNode.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, rightExpressions); joinNode.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, leftExpressions); JoinType jt = (JoinType)joinNode.getProperty(NodeConstants.Info.JOIN_TYPE); joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, jt.getReverseType()); }
/** * @param joinNode */ static void swapJoinChildren(PlanNode joinNode) { PlanNode leftChild = joinNode.getFirstChild(); joinNode.removeChild(leftChild); joinNode.addLastChild(leftChild); List leftExpressions = (List)joinNode.getProperty(NodeConstants.Info.LEFT_EXPRESSIONS); List rightExpressions = (List)joinNode.getProperty(NodeConstants.Info.RIGHT_EXPRESSIONS); joinNode.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, rightExpressions); joinNode.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, leftExpressions); JoinType jt = (JoinType)joinNode.getProperty(NodeConstants.Info.JOIN_TYPE); joinNode.setProperty(NodeConstants.Info.JOIN_TYPE, jt.getReverseType()); }
joinNode.removeChild(optionalNode); joinNode.getFirstChild().setProperty(NodeConstants.Info.OUTPUT_COLS, joinNode.getProperty(NodeConstants.Info.OUTPUT_COLS)); NodeEditor.removeChildNode(parentNode, joinNode);
joinNode.removeChild(optionalNode); joinNode.getFirstChild().setProperty(NodeConstants.Info.OUTPUT_COLS, joinNode.getProperty(NodeConstants.Info.OUTPUT_COLS)); NodeEditor.removeChildNode(parentNode, joinNode);
parentAccess.removeChild(childLimit); parentAccess.addFirstChild(childLimit.getFirstChild()); removedLimit = true;
if (parentProject.getParent() == null) { root = parentProject.getFirstChild(); parentProject.removeChild(root); return root;
if (parentProject.getParent() == null) { root = parentProject.getFirstChild(); parentProject.removeChild(root); return root;