[ 
https://issues.apache.org/jira/browse/SPARK-6988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14568705#comment-14568705
 ] 

Saurabh Santhosh commented on SPARK-6988:
-----------------------------------------

Hey,
Can someone update the Spark documentation as well. (For correct usage of Data 
Frames)

https://spark.apache.org/docs/latest/sql-programming-guide.html

Eg : 

DataFrame teenagers = sqlContext.sql("SELECT name FROM parquetFile WHERE age >= 
13 AND age <= 19");
List<String> teenagerNames = teenagers.map(new Function<Row, String>() {
  public String call(Row row) {
    return "Name: " + row.getString(0);
  }
}).collect();

to change teenagers.map to teenagers.javaRDD().map

> Fix Spark SQL documentation for 1.3.x
> -------------------------------------
>
>                 Key: SPARK-6988
>                 URL: https://issues.apache.org/jira/browse/SPARK-6988
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.3.0, 1.3.1
>            Reporter: Olivier Girardot
>            Assignee: Olivier Girardot
>            Priority: Minor
>             Fix For: 1.3.2, 1.4.0
>
>
> There are a few glitches regarding the DataFrame API usage in Java.
> The most important one being how to map a DataFrame result, using the javaRDD 
> method.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to