public Map<String, PropertyMap> selectProperties(String namePrefix, JexlExpression predicate, List<String> projectStr) {
    final Function<PropertyMap, PropertyMap> transform = (map)->{
      MapWrapper wrapped = new MapWrapper(map);
      Object result;
      try {
        result = predicate.evaluate(wrapped);
      } catch(JexlException xany) {
        if (LOGGER.isDebugEnabled()) {
          LOGGER.debug(predicate.getSourceText(), xany);
        }
        throw new PropertyException(xany);
      }
      if (Boolean.TRUE.equals(result)) {
        if (projectStr == null || projectStr.isEmpty()) {
          return map;
        }
        Map<String, Object> projected = new TreeMap<>();
        for(String projectName : projectStr) {
          // if this looks like the name of a property, use it
          if (map.getTypeOf(projectName)!= null) {
            Object value = map.getPropertyValue(projectName);
            if (value != null) {
              projected.put(projectName, value);
            }
          } else {
            // try to use it as the source of a JEXL expression
            try {
              JexlExpression projector = JEXL.createExpression(projectName);
              Object evaluated = projector.evaluate(wrapped);
              if (evaluated instanceof Map<?,?>) {
                @SuppressWarnings("unchecked") Map<String,?> cast = (Map<String,?>) evaluated;
                projected.putAll(cast);
              }
            } catch(JexlException xany) {
              LOGGER.warn(projectName, xany);
            }
          }
        }
        return new PropertyMap(map, projected);
      }
      return  null;
    };
    return selectProperties(namePrefix, transform);
  }
Selects a set of properties.
@param namePrefix the map name prefix
@param predicate the condition selecting maps
@param projectStr the projection property names or script
@return the map of property maps keyed by their name
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/properties/PropertyManager.java