Skip to content

Commit

Permalink
[SPARK-6275][Documentation]Miss toDF() function in docs/sql-programmi…
Browse files Browse the repository at this point in the history
…ng-guide.md

Miss `toDF()` function in docs/sql-programming-guide.md

Author: zzcclp <[email protected]>

Closes apache#4977 from zzcclp/SPARK-6275 and squashes the following commits:

9a96c7b [zzcclp] Miss toDF()
  • Loading branch information
zzcclp authored and srowen committed Mar 12, 2015
1 parent 4e47d54 commit 304366c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/sql-programming-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ import sqlContext.implicits._
case class Person(name: String, age: Int)

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

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

0 comments on commit 304366c

Please sign in to comment.