Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/19884#discussion_r157738359
--- Diff: python/pyspark/sql/types.py ---
@@ -1679,6 +1678,15 @@ def from_arrow_schema(arrow_schema):
for field in arrow_schema])
+def _require_minimum_pyarrow_version():
+ """ Raise ImportError if minimum version of pyarrow is not installed
+ """
+ from distutils.version import LooseVersion
+ import pyarrow
+ if pyarrow.__version__ < LooseVersion('0.8.0'):
--- End diff --
BTW, I usually do like `LooseVersion(pyarrow.__version__) < "0.8.0"` tho.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]