devin-petersohn commented on code in PR #53873:
URL: https://github.com/apache/spark/pull/53873#discussion_r2710161448
##########
python/pyspark/tests/upstream/pyarrow/test_pyarrow_type_coercion.py:
##########
@@ -35,13 +35,17 @@
import unittest
from typing import Any, List, Tuple
+from pyspark.loose_version import LooseVersion
from pyspark.testing.utils import (
have_pandas,
have_pyarrow,
pandas_requirement_message,
pyarrow_requirement_message,
)
+if have_pyarrow:
+ import pyarrow as pa
Review Comment:
Nit: I find this slightly more readable if you reuse the variable name in
the skip clauses.
```suggestion
if have_pyarrow:
import pyarrow as pa
pyarrow_19_or_greater = LooseVersion(pa.__version__) >=
LooseVersion("19.0.0")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]