code: public boolean hasAncestorOfType( Set<Type> types ) {
          PlanNode node = this.parent;
          while (node != null) {
              if (types.contains(node.getType())) return true;
              node = node.getParent();
          }
          return false;
      }
docs: Determine whether this node has an ancestor with any of the supplied types.
  
  @param types the types; may not be null
  @return true if there is at least one ancestor that has any of the supplied types, or false otherwise