Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,10 @@ class DataFrame private[sql](
/////////////////////////////////////////////////////////////////////////////

/**
* Returns the content of the [[DataFrame]] as an [[RDD]] of [[Row]]s.
* Represents the content of the [[DataFrame]] as an [[RDD]] of [[Row]]s.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update the doc to say that the RDD is memoized, i.e. once called, even if you change the spark sql configuration, it won't change the plan anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's a good point.

* @group rdd
*/
def rdd: RDD[Row] = {
lazy val rdd: RDD[Row] = {
// use a local variable to make sure the map closure doesn't capture the whole DataFrame
val schema = this.schema
queryExecution.executedPlan.execute().map(ScalaReflection.convertRowToScala(_, schema))
Expand Down