@Override
    public boolean evaluate(Resource resource) {

      Set<Map<String, Object>> extendedPropertySet = joinedResources.get(resource);

      if (extendedPropertySet == null) {
        return predicate.evaluate(resource);
      }

      for (Map<String, Object> extendedProperties : extendedPropertySet) {
        Resource extendedResource = new ExtendedResourceImpl(resource, extendedProperties);

        if (predicate.evaluate(extendedResource)) {
          return true;
        }
      }
      return false;
    }
Constructor

@param predicate        the predicate being extended
@param joinedResources  the map of extended sets of property values
ambari-server/src/main/java/org/apache/ambari/server/api/query/ExtendedResourcePredicateVisitor.java