Github user chenghao-intel commented on the pull request:
https://github.com/apache/spark/pull/7334#issuecomment-121838166
@JoshRosen ,seems `execution.CollectLimit` will eventually invoke the code
like (in SparkPlan.executeTake):
```scala
sc.runJob(childRDD, (it: Iterator[InternalRow]) => it.take(left).toArray,
p, allowLocal = false)
```
I am wondering if
`execution.CollectLimit(limit, planLater(child))`
V.S.
`execution.Limit(global = true, limit, execution.Limit(global=false, limit,
child))`
are actually equals in data shuffling / copying, if so, probably we can
simplify the code by removing the `CollectLimit` and `ReturnAnswer`.
Sorry if I missed something.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]