You can get a type preserving serializer from TypeInformation of DataSet and set it in the constructor of ColloctionOutputFormat.