Skip to content

Commit 0f74bac

Browse files
cloud-fanHyukjinKwon
authored andcommitted
[SPARK-24709][SQL][2.4] use str instead of basestring in isinstance
## What changes were proposed in this pull request? after backport apache#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 apache#22858 from cloud-fan/python. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: hyukjinkwon <[email protected]>
1 parent f575616 commit 0f74bac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/pyspark/sql/functions.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
if sys.version < "3":
2626
from itertools import imap as map
2727

28+
if sys.version >= '3':
29+
basestring = str
30+
2831
from pyspark import since, SparkContext
2932
from pyspark.rdd import ignore_unicode_prefix, PythonEvalType
3033
from pyspark.sql.column import Column, _to_java_column, _to_seq, _create_column_from_literal

0 commit comments

Comments
 (0)