private FieldPath getFieldPath(String fieldName) {
        if (fieldMap != null && fieldMap.containsKey(fieldName)) {
            fieldName = fieldMap.get(fieldName);
        }
        checkAccess(new Field(fieldName));
        FieldPath path = FieldPath.newInstance(getDataType(), fieldName);
        if (path == null || path.size() == 0) {
            throw new IllegalArgumentException("Malformed schema mapping '" + fieldName + "'.");
        }
        return path;
    }
note that the returned Field may not be in this Document
directly, but may refer to a field in a struct contained in it,
in which case the returned Field is only useful for obtaining
the field type; it can't be used for get() and set().
docproc/src/main/java/com/yahoo/docproc/proxy/ProxyDocument.java