[SPARK-4673][SQL] Optimizing limit using coalesce

Optimizing limit using coalesce to avoid shuffle.
Can we move the `map(_.copy)` after `take(limit)`?