diff options
author | hyukjinkwon <gurwls223@gmail.com> | 2016-05-10 22:21:17 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-05-10 22:21:17 -0700 |
commit | 3ff012051f5bb433abb868e590e59dea18867cd8 (patch) | |
tree | d7b469774d88f98a1da9bdac7c163fbbde9937de /python | |
parent | 5a5b83c97bbab1d717dcc30b09aafb7c0ed85069 (diff) | |
download | spark-3ff012051f5bb433abb868e590e59dea18867cd8.tar.gz spark-3ff012051f5bb433abb868e590e59dea18867cd8.tar.bz2 spark-3ff012051f5bb433abb868e590e59dea18867cd8.zip |
[SPARK-15250][SQL] Remove deprecated json API in DataFrameReader
## What changes were proposed in this pull request?
This PR removes the old `json(path: String)` API which is covered by the new `json(paths: String*)`.
## How was this patch tested?
Jenkins tests (existing tests should cover this)
Author: hyukjinkwon <gurwls223@gmail.com>
Author: Hyukjin Kwon <gurwls223@gmail.com>
Closes #13040 from HyukjinKwon/SPARK-15250.
Diffstat (limited to 'python')
-rw-r--r-- | python/pyspark/sql/readwriter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pyspark/sql/readwriter.py b/python/pyspark/sql/readwriter.py index 20250b431b..7e79df33e8 100644 --- a/python/pyspark/sql/readwriter.py +++ b/python/pyspark/sql/readwriter.py @@ -241,8 +241,8 @@ class DataFrameReader(object): if columnNameOfCorruptRecord is not None: self.option("columnNameOfCorruptRecord", columnNameOfCorruptRecord) if isinstance(path, basestring): - return self._df(self._jreader.json(path)) - elif type(path) == list: + path = [path] + if type(path) == list: return self._df(self._jreader.json(self._sqlContext._sc._jvm.PythonUtils.toSeq(path))) elif isinstance(path, RDD): def func(iterator): |