Skip to content

Commit 939a322

Browse files
mrocklinmarmbrus
authored andcommitted
[SPARK-3417] Use new-style classes in PySpark
Tiny PR making SQLContext a new-style class. This allows various type logic to work more effectively ```Python In [1]: import pyspark In [2]: pyspark.sql.SQLContext.mro() Out[2]: [pyspark.sql.SQLContext, object] ``` Author: Matthew Rocklin <[email protected]> Closes apache#2288 from mrocklin/sqlcontext-new-style-class and squashes the following commits: 4aadab6 [Matthew Rocklin] update other old-style classes a2dc02f [Matthew Rocklin] pyspark.sql.SQLContext is new-style class
1 parent 26bc765 commit 939a322

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

python/pyspark/mllib/random.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
__all__ = ['RandomRDDs', ]
2929

3030

31-
class RandomRDDs:
31+
class RandomRDDs(object):
3232
"""
3333
Generator methods for creating RDDs comprised of i.i.d samples from
3434
some distribution.

python/pyspark/mllib/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from pyspark.serializers import NoOpSerializer
2626

2727

28-
class MLUtils:
28+
class MLUtils(object):
2929

3030
"""
3131
Helper methods to load, save and pre-process data used in MLlib.

python/pyspark/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ def __reduce__(self):
899899
return Row
900900

901901

902-
class SQLContext:
902+
class SQLContext(object):
903903

904904
"""Main entry point for Spark SQL functionality.
905905

python/pyspark/storagelevel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
__all__ = ["StorageLevel"]
1919

2020

21-
class StorageLevel:
21+
class StorageLevel(object):
2222

2323
"""
2424
Flags for controlling the storage of an RDD. Each StorageLevel records whether to use memory,

0 commit comments

Comments
 (0)