Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/999#discussion_r13828608
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
    @@ -99,6 +97,35 @@ class SQLContext(@transient val sparkContext: 
SparkContext)
         new SchemaRDD(this, parquet.ParquetRelation(path))
     
       /**
    +   * Loads a JSON file (one object per line), returning the result as a 
[[SchemaRDD]].
    +   *
    +   * @group userf
    +   */
    +  def jsonFile(path: String): SchemaRDD = jsonFile(path, 1.0)
    +
    +  /**
    +   * :: Experimental ::
    +   */
    +  def jsonFile(path: String, samplingRatio: Double): SchemaRDD = {
    +    val json = sparkContext.textFile(path)
    +    jsonRDD(json, samplingRatio)
    +  }
    +
    +  /**
    +   * Loads a RDD[String] storing JSON objects (one object per record), 
returning the result as a
    +   * [[SchemaRDD]].
    +   *
    +   * @group userf
    +   */
    +  def jsonRDD(json: RDD[String]): SchemaRDD = jsonRDD(json, 1.0)
    +
    +  /**
    +   * :: Experimental ::
    +   */
    +  def jsonRDD(json: RDD[String], samplingRatio: Double): SchemaRDD =
    --- End diff --
    
    Annotation too.


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

Reply via email to