public static List<String> getMFieldNames(List<String> fields)
            throws MetaException {
        // if there are no fields requested, it means all the fields are requested which include
        // multi-valued fields.
        if (fields == null || fields.isEmpty()) {
            return null;
        }
        // throw exception if there are invalid field names
        validate(fields);
        // else, check if all the fields are single-valued. In case there are multi-valued fields requested
        // return null since setResult in JDO doesn't support multi-valued fields
        if (!allSingleValuedFields.keySet().containsAll(fields)) {
            return null;
        }

        List<String> jdoFields = new ArrayList<>(fields.size());

        for (String field : fields) {
            jdoFields.add(allSingleValuedFields.get(field));
        }
        return jdoFields;
    }
Given a list of table fields, checks if all the fields requested are single-valued. If all
the fields are single-valued returns list of equivalent MTable fieldnames
which can be used in the setResult clause of a JDO query

@param fields of tableFields in the projection
@return List of JDO field names which can be used in setResult clause
of a JDO query. Returns null if input fields cannot be used in a setResult clause
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/TableFields.java