Skip to content

Commit f98f50a

Browse files
committed
fix
1 parent e8d6f54 commit f98f50a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/pyspark/ml/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
from contextlib import contextmanager
4141

4242
from pyspark import since
43-
from pyspark.errors.exceptions.connect import SparkException
4443
from pyspark.ml.common import inherit_doc
4544
from pyspark.sql import SparkSession
4645
from pyspark.sql.utils import is_remote
@@ -319,6 +318,8 @@ def remote_call() -> Any:
319318
return deserialize(properties)
320319

321320
if is_remote() and "PYSPARK_NO_NAMESPACE_SHARE" not in os.environ:
321+
from pyspark.errors.exceptions.connect import SparkException
322+
322323
try:
323324
return remote_call()
324325
except SparkException as e:

0 commit comments

Comments
 (0)