docs: 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;
      }