ueshin commented on a change in pull request #32300:
URL: https://github.com/apache/spark/pull/32300#discussion_r618619506
##########
File path: python/pyspark/pandas/tests/test_series.py
##########
@@ -857,15 +848,7 @@ def _test_value_counts(self):
)
def test_value_counts(self):
- if LooseVersion(pyspark.__version__) < LooseVersion("2.4"):
- with self.sql_conf({SPARK_CONF_ARROW_ENABLED: False}):
- self._test_value_counts()
- self.assertRaises(
- RuntimeError,
- lambda: ps.MultiIndex.from_tuples([("x", "a"), ("x",
"b")]).value_counts(),
- )
- else:
- self._test_value_counts()
+ self._test_value_counts()
Review comment:
Do we call `self._test_value_counts()` somewhere else?
If not, we can just remove this and rename `_test_value_counts` to
`test_value_counts`?
##########
File path: python/pyspark/pandas/tests/indexes/test_base.py
##########
@@ -2249,13 +2235,7 @@ def test_to_list(self):
kmidx = ps.from_pandas(pmidx)
self.assert_eq(kidx.tolist(), pidx.tolist())
-
- if LooseVersion(pyspark.__version__) < LooseVersion("2.4"):
- # PySpark < 2.4 does not support struct type with arrow enabled.
- with self.sql_conf({SPARK_CONF_ARROW_ENABLED: False}):
- self.assert_eq(kmidx.tolist(), pmidx.tolist())
- else:
- self.assert_eq(kidx.tolist(), pidx.tolist())
+ self.assert_eq(kidx.tolist(), pidx.tolist())
Review comment:
Seems like the same tests?
I guess the second one should be `kmidx.tolist()`?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]