Skip to content

Commit bd30317

Browse files
committed
workaround spark context config issue
1 parent 6ab47c6 commit bd30317

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

python/pyspark/sql/tests.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
_have_pyarrow = _pyarrow_requirement_message is None
8181
_test_compiled = _test_not_compiled_message is None
8282

83-
from pyspark import SparkContext
83+
from pyspark import SparkContext, SparkConf
8484
from pyspark.sql import SparkSession, SQLContext, HiveContext, Column, Row
8585
from pyspark.sql.types import *
8686
from pyspark.sql.types import UserDefinedType, _infer_type, _make_type_verifier
@@ -4559,11 +4559,8 @@ class MaxResultArrowTests(unittest.TestCase):
45594559

45604560
@classmethod
45614561
def setUpClass(cls):
4562-
cls.spark = SparkSession.builder \
4563-
.master("local[4]") \
4564-
.appName(cls.__name__) \
4565-
.config("spark.driver.maxResultSize", "10k") \
4566-
.getOrCreate()
4562+
cls.spark = SparkSession(SparkContext(
4563+
'local[4]', cls.__name__, conf=SparkConf().set("spark.driver.maxResultSize", "10k")))
45674564

45684565
# Explicitly enable Arrow and disable fallback.
45694566
cls.spark.conf.set("spark.sql.execution.arrow.enabled", "true")

0 commit comments

Comments
 (0)