class VectorAssemblerMapper extends MISOMapper {

    @Override
    protected Object map(Object[] input) {
        if (null == input) {
            return null;
        }
        int pos = 0;
        Map<Integer, Double> map = new HashMap<>();
        // getVector the data, and write it in List.
        for (Object col : input) {
            if (null != col) {
                if (col instanceof Number) {
                    map.put(pos++, ((Number)col).doubleValue());
                } else if (col instanceof String) {
                    Vector vec = VectorUtil.getVector(col);
                    pos = appendVector(vec, map, pos);
                } else if (col instanceof Vector) {
                    pos = appendVector((Vector) col, map, pos);
                } else {
                    throw new UnsupportedOperationException("not support type of object.");
                }
            } else {
                switch (handleInvalid) {
                    case ERROR:
                        throw new NullPointerException("null value is found in vector assembler inputs.");
                    case SKIP:
                        return null;
                    default:
                }
            }
        }

		/* form the vector, and finally toString it. */
        Vector vec = new SparseVector(pos, map);

        if (map.size() * RATIO > pos) {
            vec = ((SparseVector)vec).toDenseVector();
        }
        return vec;
    }

    public  VectorAssemblerMapper(TableSchema dataSchema, Params params);

}