Skip to content

Commit 12d20dd

Browse files
committed
[SPARK-22874][PYSPARK][SQL][FOLLOW-UP] Modify error messages to show actual versions.
## What changes were proposed in this pull request? This is a follow-up pr of #20054 modifying error messages for both pandas and pyarrow to show actual versions. ## How was this patch tested? Existing tests. Author: Takuya UESHIN <[email protected]> Closes #20074 from ueshin/issues/SPARK-22874_fup1.
1 parent 33ae243 commit 12d20dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/pyspark/sql/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def require_minimum_pandas_version():
118118
from distutils.version import LooseVersion
119119
import pandas
120120
if LooseVersion(pandas.__version__) < LooseVersion('0.19.2'):
121-
raise ImportError("Pandas >= 0.19.2 must be installed on calling Python process")
121+
raise ImportError("Pandas >= 0.19.2 must be installed on calling Python process; "
122+
"however, your version was %s." % pandas.__version__)
122123

123124

124125
def require_minimum_pyarrow_version():
@@ -127,4 +128,5 @@ def require_minimum_pyarrow_version():
127128
from distutils.version import LooseVersion
128129
import pyarrow
129130
if LooseVersion(pyarrow.__version__) < LooseVersion('0.8.0'):
130-
raise ImportError("pyarrow >= 0.8.0 must be installed on calling Python process")
131+
raise ImportError("pyarrow >= 0.8.0 must be installed on calling Python process; "
132+
"however, your version was %s." % pyarrow.__version__)

0 commit comments

Comments
 (0)