It would be better to call this `resultSer` here and other places where you're using this name. Every serializer in Spark serializes objects, so it could be specified more precisely.