You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "pedrumj2 (via GitHub)" <gi...@apache.org> on 2026/09/17 02:45:45 UTC

[PR] [MINOR][SQL][TEST] Make the not-null and null-map-key test assertions… [spark]

pedrumj2 opened a new pull request, #58878:
URL: https://github.com/apache/spark/pull/58878

   ### What changes were proposed in this pull request?
   
   Refactors test assertions into protected methods.
   
   ### Why are the changes needed?
   
   Some downstream consumers such as Apache Gluten reuse these test to ensure spark functionality is tested on changes. In apache/gluten#12976 after the velox map_from_arrays operator was enabled, the Exception asserted in some spark tests changed (while core logic remained the same). This required either:
   - Disabling the test --> losing test coverage
   - Copying the entire test --> Duplicating code
   
   By making the assertion protected, downstream consumers can override the limited lines without having to copy the entire test body allowing better re-usability downstream.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   ```
   build/mvn -pl sql/core -am test -Dtest=none -DfailIfNoTests=false \
     -DwildcardSuites=org.apache.spark.sql.RuntimeNullChecksV2Writes,org.apache.spark.sql.DataFrameFunctionsSuite
   
   RuntimeNullChecksV2Writes:
   ...
   DataFrameFunctionsSuite:
   ...
   Run completed in 50 seconds, 854 milliseconds.
   Total number of tests run: 176
   Suites: completed 4, aborted 0
   Tests: succeeded 176, failed 0, canceled 0, ignored 0, pending 0
   All tests passed.
   [INFO] BUILD SUCCESS
   ```
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Co-authored with Claude Code (Opus 5)
   


-- 
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] [MINOR][SQL][TEST] Make test assertions protected functions for downstream reusability [spark]

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

   CC @wangyum @HyukjinKwon I saw you previously helped review a similar PR: https://github.com/apache/spark/pull/52996
   
   Wondering if you could help take a look here?
   
   
   @HyukjinKwon  I did see your [comment](https://github.com/apache/spark/pull/52996#pullrequestreview-3449022354) on that PR:
   
   > I think we shouldn't really change the test code for other projects to use .. but if this is the only one, one time thing should be fine.
   
   What would be the recommended approach for spark plugin developers to ensure they haven't broken spark functionality? Currently [Gluten](https://github.com/apache/gluten) relies on running these tests to ensure changes don't break core Spark functionality. 


-- 
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-62103][SQL][TEST] Make test assertions protected functions for downstream reusability [spark]

Posted by "pedrumj2 (via GitHub) via reviews" <re...@spark.apache.org>.
pedrumj2 commented on PR #58878:
URL: https://github.com/apache/spark/pull/58878#issuecomment-7030845191

   CC @dongjoon-hyun when you get the chance can you please also take a look at this one, thanks!


-- 
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] [MINOR][SQL][TEST] Make test assertions protected functions for downstream reusability [spark]

Posted by "pedrumj2 (via GitHub)" <gi...@apache.org>.
pedrumj2 closed pull request #58878: [MINOR][SQL][TEST] Make test assertions protected functions for downstream reusability 
URL: https://github.com/apache/spark/pull/58878


-- 
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-62097][SQL][TEST] Make test assertions protected functions for downstream reusability [spark]

Posted by "pedrumj2 (via GitHub) via reviews" <re...@spark.apache.org>.
pedrumj2 commented on PR #58878:
URL: https://github.com/apache/spark/pull/58878#issuecomment-7018070545

   @LuciferYang when you get the chance if you can please help take a look at this one too would be appreciated. Thanks!
   
   https://issues.apache.org/jira/browse/SPARK-62097


-- 
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