diff options
author | Yanbo Liang <ybliang8@gmail.com> | 2015-12-11 11:47:35 -0800 |
---|---|---|
committer | Shivaram Venkataraman <shivaram@cs.berkeley.edu> | 2015-12-11 11:47:35 -0800 |
commit | 0fb9825556dbbcc98d7eafe9ddea8676301e09bb (patch) | |
tree | f89813a20b893dbf65c019e4a031a7d3e189c135 /examples/src/main | |
parent | c119a34d1e9e599e302acfda92e5de681086a19f (diff) | |
download | spark-0fb9825556dbbcc98d7eafe9ddea8676301e09bb.tar.gz spark-0fb9825556dbbcc98d7eafe9ddea8676301e09bb.tar.bz2 spark-0fb9825556dbbcc98d7eafe9ddea8676301e09bb.zip |
[SPARK-12146][SPARKR] SparkR jsonFile should support multiple input files
* ```jsonFile``` should support multiple input files, such as:
```R
jsonFile(sqlContext, c(“path1”, “path2”)) # character vector as arguments
jsonFile(sqlContext, “path1,path2”)
```
* Meanwhile, ```jsonFile``` has been deprecated by Spark SQL and will be removed at Spark 2.0. So we mark ```jsonFile``` deprecated and use ```read.json``` at SparkR side.
* Replace all ```jsonFile``` with ```read.json``` at test_sparkSQL.R, but still keep jsonFile test case.
* If this PR is accepted, we should also make almost the same change for ```parquetFile```.
cc felixcheung sun-rui shivaram
Author: Yanbo Liang <ybliang8@gmail.com>
Closes #10145 from yanboliang/spark-12146.
Diffstat (limited to 'examples/src/main')
-rw-r--r-- | examples/src/main/r/dataframe.R | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/src/main/r/dataframe.R b/examples/src/main/r/dataframe.R index 53b817144f..62f60e57ee 100644 --- a/examples/src/main/r/dataframe.R +++ b/examples/src/main/r/dataframe.R @@ -35,7 +35,7 @@ printSchema(df) # Create a DataFrame from a JSON file path <- file.path(Sys.getenv("SPARK_HOME"), "examples/src/main/resources/people.json") -peopleDF <- jsonFile(sqlContext, path) +peopleDF <- read.json(sqlContext, path) printSchema(peopleDF) # Register this DataFrame as a table. |