You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2017/02/26 07:06:10 UTC

[GitHub] spark pull request #17071: [SPARK-15615][SQL][BUILD][FOLLOW-UP] Replace depr...

Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17071#discussion_r103097154
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/sql/SQLDataSourceExample.scala ---
    @@ -135,10 +138,10 @@ object SQLDataSourceExample {
         // +------+
     
         // Alternatively, a DataFrame can be created for a JSON dataset represented by
    -    // an RDD[String] storing one JSON object per string
    -    val otherPeopleRDD = spark.sparkContext.makeRDD(
    -      """{"name":"Yin","address":{"city":"Columbus","state":"Ohio"}}""" :: Nil)
    -    val otherPeople = spark.read.json(otherPeopleRDD)
    +    // an Dataset[String] storing one JSON object per string
    +    val otherPeopleDataset = spark.sparkContext.makeRDD(
    --- End diff --
    
    can we use `spark.createDataset` here?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org