Repository: spark Updated Branches: refs/heads/branch-2.4 f575616db -> 0f74bac64
[SPARK-24709][SQL][2.4] use str instead of basestring in isinstance ## What changes were proposed in this pull request? after backport https://github.com/apache/spark/pull/22775 to 2.4, the 2.4 sbt Jenkins QA job is broken, see https://amplab.cs.berkeley.edu/jenkins/view/Spark%20QA%20Test/job/spark-branch-2.4-test-sbt-hadoop-2.7/147/console This PR adds `if sys.version >= '3': basestring = str` which onlly exists in master. ## How was this patch tested? existing test Closes #22858 from cloud-fan/python. Authored-by: Wenchen Fan <wenc...@databricks.com> Signed-off-by: hyukjinkwon <gurwls...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0f74bac6 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0f74bac6 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0f74bac6 Branch: refs/heads/branch-2.4 Commit: 0f74bac647c9f8fce112eada7913504b2c6d08fa Parents: f575616 Author: Wenchen Fan <wenc...@databricks.com> Authored: Sun Oct 28 10:50:46 2018 +0800 Committer: hyukjinkwon <gurwls...@apache.org> Committed: Sun Oct 28 10:50:46 2018 +0800 ---------------------------------------------------------------------- python/pyspark/sql/functions.py | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/0f74bac6/python/pyspark/sql/functions.py ---------------------------------------------------------------------- diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 9583a98..e1d6ea3 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -25,6 +25,9 @@ import warnings if sys.version < "3": from itertools import imap as map +if sys.version >= '3': + basestring = str + from pyspark import since, SparkContext from pyspark.rdd import ignore_unicode_prefix, PythonEvalType from pyspark.sql.column import Column, _to_java_column, _to_seq, _create_column_from_literal --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org