Skip to content

Commit 3012781

Browse files
zzcclpsrowen
authored andcommitted
[SPARK-6275][Documentation]Miss toDF() function in docs/sql-programming-guide.md
Miss `toDF()` function in docs/sql-programming-guide.md Author: zzcclp <[email protected]> Closes #4977 from zzcclp/SPARK-6275 and squashes the following commits: 9a96c7b [zzcclp] Miss toDF()
1 parent a08588c commit 3012781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/sql-programming-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ import sqlContext.implicits._
358358
case class Person(name: String, age: Int)
359359

360360
// Create an RDD of Person objects and register it as a table.
361-
val people = sc.textFile("examples/src/main/resources/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt))
361+
val people = sc.textFile("examples/src/main/resources/people.txt").map(_.split(",")).map(p => Person(p(0), p(1).trim.toInt)).toDF()
362362
people.registerTempTable("people")
363363

364364
// SQL statements can be run by using the sql methods provided by sqlContext.

0 commit comments

Comments
 (0)