Conversation
… overridable ### What changes were proposed in this pull request? Refactors test assertions into protected methods. ### Why are the changes needed? Apache Gluten reuses `RuntimeNullChecksV2Writes` and `DataFrameFunctionsSuite` against its Velox backend. As an example in apache/gluten#12976, after the map_from_arrays operator was enabled, it changed the exception thrown in these tests and required copying over the entire test only to override the exception type in the assertion. 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)
Author
|
CC @wangyum @HyukjinKwon I saw you previously helped review a similar PR: #52996 Wondering if you could help take a look here? @HyukjinKwon I did see your comment on that PR:
What would be the recommended approach for spark plugin developers to ensure they haven't broken spark functionality? Currently Gluten relies on running these tests to ensure changes don't break core Spark functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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?
Was this patch authored or co-authored using generative AI tooling?
Generated-by: Co-authored with Claude Code (Opus 5)