Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/1774#discussion_r15790226
--- Diff: docs/sql-programming-guide.md ---
@@ -152,6 +152,41 @@ val teenagers = sqlContext.sql("SELECT name FROM
people WHERE age >= 13 AND age
teenagers.map(t => "Name: " + t(0)).collect().foreach(println)
{% endhighlight %}
+Another way to turns an RDD to table is to use `applySchema`. Here is an
example.
--- End diff --
It would be good to provide some motivation here. Perhaps talk about
programmatically creating a schema when it is not possible to statically define
classes ahead of time.
Related: an example where the schema is determined statically might make
more sense (i.e. read from the first row of the file?) but maybe that is too
complicated...
Minor: Usually we just say "For example".
---
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]