private void removeASTChild(ASTNode node) {
    Optional.ofNullable(node.getParent())
        .ifPresent(parent -> {
          parent.deleteChild(node.getChildIndex());
          node.setParent(null);
        });
  }
Planner specific stuff goes in here.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java