private Predicate getSubResourcePredicate(Predicate predicate, String category) {
    if (predicate == null) {
      return null;
    }

    SubResourcePredicateVisitor visitor = new SubResourcePredicateVisitor(category);
    PredicateHelper.visit(predicate, visitor);
    return visitor.getSubResourcePredicate();
  }
Merge the tree of query properties returned by the renderer with properties in
the query tree.

@param node   property tree node
@param query  query associated with the property tree node
ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java