Github user chenghao-intel commented on a diff in the pull request: https://github.com/apache/spark/pull/4336#discussion_r24055322 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/DataFrameImpl.scala --- @@ -260,11 +260,11 @@ private[sql] class DataFrameImpl protected[sql]( override def take(n: Int): Array[Row] = head(n) - override def collect(): Array[Row] = queryExecution.executedPlan.executeCollect() + override def collect(): Array[Row] = rdd.collect() override def collectAsList(): java.util.List[Row] = java.util.Arrays.asList(rdd.collect() :_*) - override def count(): Long = groupBy().count().rdd.collect().head.getLong(0) + override def count(): Long = rdd.count() --- End diff -- Hmm, but the `rdd.count()` is not necessary to go through the Catalyst optimizer, isn't it? It's already an parallel processing.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org