You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/05/14 08:03:04 UTC

[PR] [PYTHON][CONNECT][TESTS] Drop redundant `SQLTestUtils` mixin from `ReusedMixedTestCase` [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56863][PYTHON][PS][TESTS] Drop redundant `SQLTestUtils` [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #55875: [SPARK-56863][PYTHON][PS][TESTS] Drop redundant `SQLTestUtils`
URL: https://github.com/apache/spark/pull/55875


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-56863][PYTHON][PS][TESTS] Drop redundant `SQLTestUtils` [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #55875:
URL: https://github.com/apache/spark/pull/55875#issuecomment-4483528667

   thanks, merged to master


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org