Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/6780#discussion_r32394261
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/basicOperators.scala ---
@@ -160,17 +166,22 @@ case class TakeOrdered(limit: Int, sortOrder:
Seq[SortOrder], child: SparkPlan)
private val ord: RowOrdering = new RowOrdering(sortOrder, child.output)
- private def collectData(): Array[InternalRow] =
- child.execute().map(_.copy()).takeOrdered(limit)(ord)
+ @transient private val projection = projectList.map(newProjection(_,
child.output))
--- End diff --
I'm confused here that we have to add `@transient` for it to avoid
`NotSerializableException` . It looks to me that `TakeOrderedAndProject` should
run on driver side and it doesn't pass its reference to RDD functions. Sorry if
I missed something here.
---
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]