You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/01/16 03:40:17 UTC
[spark] branch master updated:
[SPARK-30434][FOLLOW-UP][PYTHON][SQL] Make the parameter list consistent in
createDataFrame
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 0a95eb0 [SPARK-30434][FOLLOW-UP][PYTHON][SQL] Make the parameter list consistent in createDataFrame
0a95eb0 is described below
commit 0a95eb08003a115f59495b30aacaaa832940e977
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Thu Jan 16 12:39:44 2020 +0900
[SPARK-30434][FOLLOW-UP][PYTHON][SQL] Make the parameter list consistent in createDataFrame
### What changes were proposed in this pull request?
This is a followup of https://github.com/apache/spark/pull/27109. It should match the parameter lists in `createDataFrame`.
### Why are the changes needed?
To pass parameters supposed to pass.
### Does this PR introduce any user-facing change?
No (it's only in master)
### How was this patch tested?
Manually tested and existing tests should cover.
Closes #27225 from HyukjinKwon/SPARK-30434-followup.
Authored-by: HyukjinKwon <gu...@apache.org>
Signed-off-by: HyukjinKwon <gu...@apache.org>
---
python/pyspark/sql/pandas/conversion.py | 2 +-
python/pyspark/sql/session.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/python/pyspark/sql/pandas/conversion.py b/python/pyspark/sql/pandas/conversion.py
index 1c957a1..4237410 100644
--- a/python/pyspark/sql/pandas/conversion.py
+++ b/python/pyspark/sql/pandas/conversion.py
@@ -267,7 +267,7 @@ class SparkConversionMixin(object):
warnings.warn(msg)
raise
data = self._convert_from_pandas(data, schema, timezone)
- return self._create_dataframe(data, schema, samplingRatio, samplingRatio)
+ return self._create_dataframe(data, schema, samplingRatio, verifySchema)
def _convert_from_pandas(self, pdf, schema, timezone):
"""
diff --git a/python/pyspark/sql/session.py b/python/pyspark/sql/session.py
index bf858bc..233f492 100644
--- a/python/pyspark/sql/session.py
+++ b/python/pyspark/sql/session.py
@@ -598,10 +598,10 @@ class SparkSession(SparkConversionMixin):
if has_pandas and isinstance(data, pandas.DataFrame):
# Create a DataFrame from pandas DataFrame.
return super(SparkSession, self).createDataFrame(
- data, schema, verifySchema, samplingRatio)
- return self._create_dataframe(data, schema, verifySchema, samplingRatio)
+ data, schema, samplingRatio, verifySchema)
+ return self._create_dataframe(data, schema, samplingRatio, verifySchema)
- def _create_dataframe(self, data, schema, verifySchema, samplingRatio):
+ def _create_dataframe(self, data, schema, samplingRatio, verifySchema):
if isinstance(schema, StructType):
verify_func = _make_type_verifier(schema) if verifySchema else lambda _: True
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org