@Override
        public void onPrimitive(FieldValue fv) {
            if (retVal != null) {
                if (multiValue) {
                    ((Array<FieldValue>) retVal).add(fv);
                } else {
                    Array<FieldValue> afv = new Array<>(new ArrayDataType(retVal.getDataType()));
                    afv.add(retVal);
                    afv.add(fv);
                    retVal = afv;
                    multiValue = true;
                }
            } else {
                retVal = fv;
            }
        }
Used to retrieve wrapped type for simple types, such that you can use get methods to retrieve ints and floats
directly instead of Int/Float field values. Complex types that can't be specified by simple java types just
return themselves.
document/src/main/java/com/yahoo/document/datatypes/FieldValue.java