Unlike gapply, gapplyCollect requires additional ser/de steps because it can omit the schema, and Spark SQL doesn't know the return type before actually execution happens.
In original code path, it's done via using binary schema. Once gapply is done (
SPARK-26761). we can mimic this approach in vectorized gapply to support gapplyCollect.