zhengruifeng opened a new pull request, #55875:
URL: https://github.com/apache/spark/pull/55875
### What changes were proposed in this pull request?
Drop the redundant `SQLTestUtils` mixin from `ReusedMixedTestCase` in
`python/pyspark/testing/connectutils.py`.
```diff
-class ReusedMixedTestCase(ReusedConnectTestCase, SQLTestUtils):
+class ReusedMixedTestCase(ReusedConnectTestCase):
```
Its parent `ReusedConnectTestCase` already mixes in `SQLTestUtils`:
```python
class ReusedConnectTestCase(PySparkBaseTestCase, SQLTestUtils,
PySparkErrorTestUtils):
```
so listing `SQLTestUtils` again on `ReusedMixedTestCase` is redundant. The
MRO and the inherited helper methods (`sql_conf`, `table`, `temp_view`, ...)
are unchanged after the drop:
```
MRO: ['ReusedMixedTestCase', 'ReusedConnectTestCase',
'PySparkBaseTestCase', 'TestCase', 'SQLTestUtils',
'PySparkErrorTestUtils', 'object']
```
The `from pyspark.testing.sqlutils import SQLTestUtils` import is kept
because `ReusedConnectTestCase` still uses it.
### Why are the changes needed?
Cleanup — same spirit as #55586 (`[SPARK-56841][SQL][TESTS] Drop redundant
BeforeAndAfterEach and SharedSparkSession mixins`) but on the Python side.
### Does this PR introduce _any_ user-facing change?
No. Test-infra-only change.
### How was this patch tested?
MRO and `issubclass` checks on `ReusedMixedTestCase` confirm `SQLTestUtils`,
`PySparkErrorTestUtils`, and `unittest.TestCase` are all still in the chain,
and that helper methods `sql_conf` / `table` still resolve via the inherited
`SQLTestUtils`.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude opus-4-7
--
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]