Github user yhuai commented on a diff in the pull request: https://github.com/apache/spark/pull/1346#discussion_r14906218 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala --- @@ -102,15 +128,23 @@ class SQLContext(@transient val sparkContext: SparkContext) * * @group userf */ - def jsonFile(path: String): SchemaRDD = jsonFile(path, 1.0) + def jsonFile(path: String): SchemaRDD = jsonFile(path, 1.0, None) + + /** + * Loads a JSON file (one object per line) and applies the given schema, + * returning the result as a [[SchemaRDD]]. + * + * @group userf + */ + def jsonFile(path: String, schema: StructType): SchemaRDD = jsonFile(path, 1.0, Option(schema)) /** * :: Experimental :: */ @Experimental - def jsonFile(path: String, samplingRatio: Double): SchemaRDD = { + def jsonFile(path: String, samplingRatio: Double, schema: Option[StructType]): SchemaRDD = { --- End diff -- Oh, right, it does not make sense to have both a samplingRatio and a schema.
--- 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. ---