[SPARK-41293][SQL][TESTS] Code cleanup for assertXXX methods in ExpressionTypeCheckingSuite#38820
Closed
LuciferYang wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-41293][SQL][TESTS] Code cleanup for assertXXX methods in ExpressionTypeCheckingSuite#38820LuciferYang wants to merge 2 commits intoapache:masterfrom
assertXXX methods in ExpressionTypeCheckingSuite#38820LuciferYang wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
Author
|
cc @MaxGekk |
LuciferYang
commented
Nov 28, 2022
...lyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/ExpressionTypeCheckingSuite.scala
Show resolved
Hide resolved
LuciferYang
commented
Nov 28, 2022
Contributor
Author
There was a problem hiding this comment.
private def analysisException(expr: Expression): AnalysisException = {
intercept[AnalysisException](assertSuccess(expr))
}assertError method to deduplicate code in ExpressionTypeCheckingSuiteassertErrorForXXX method in ExpressionTypeCheckingSuite
assertErrorForXXX method in ExpressionTypeCheckingSuiteassertErrorForXXX method in ExpressionTypeCheckingSuite
assertErrorForXXX method in ExpressionTypeCheckingSuiteassertErrorForXXX method in ExpressionTypeCheckingSuite
assertErrorForXXX method in ExpressionTypeCheckingSuiteassertXXX methods in ExpressionTypeCheckingSuite
MaxGekk
approved these changes
Nov 28, 2022
assertXXX methods in ExpressionTypeCheckingSuiteassertXXX methods in ExpressionTypeCheckingSuite
Member
|
+1, LGTM. Merging to master. I have checked the test suite locally. |
Contributor
Author
|
thanks @MaxGekk |
beliefer
pushed a commit
to beliefer/spark
that referenced
this pull request
Dec 15, 2022
…pressionTypeCheckingSuite` ### What changes were proposed in this pull request? This pr do some code clean up for `assertXXX` method in `ExpressionTypeCheckingSuite`: 1. Reuse `analysisException` instead of duplicate `intercept[AnalysisException](assertSuccess(expr))` in `assertErrorForXXX` methods. 2. remove `assertError` method that is no longer used 3. Change `assertErrorForXXX` methods access scope to `private` due to they are only used in `ExpressionTypeCheckingSuite`. ### Why are the changes needed? Code clean up. ### Does this PR introduce _any_ user-facing change? No, just for test ### How was this patch tested? Pass GitHub Actions Closes apache#38820 from LuciferYang/SPARK-41293. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
beliefer
pushed a commit
to beliefer/spark
that referenced
this pull request
Dec 18, 2022
…pressionTypeCheckingSuite` ### What changes were proposed in this pull request? This pr do some code clean up for `assertXXX` method in `ExpressionTypeCheckingSuite`: 1. Reuse `analysisException` instead of duplicate `intercept[AnalysisException](assertSuccess(expr))` in `assertErrorForXXX` methods. 2. remove `assertError` method that is no longer used 3. Change `assertErrorForXXX` methods access scope to `private` due to they are only used in `ExpressionTypeCheckingSuite`. ### Why are the changes needed? Code clean up. ### Does this PR introduce _any_ user-facing change? No, just for test ### How was this patch tested? Pass GitHub Actions Closes apache#38820 from LuciferYang/SPARK-41293. Authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>
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?
This pr do some code clean up for
assertXXXmethod inExpressionTypeCheckingSuite:analysisExceptioninstead of duplicateintercept[AnalysisException](assertSuccess(expr))inassertErrorForXXXmethods.assertErrormethod that is no longer usedassertErrorForXXXmethods access scope toprivatedue to they are only used inExpressionTypeCheckingSuite.Why are the changes needed?
Code clean up.
Does this PR introduce any user-facing change?
No, just for test
How was this patch tested?
Pass GitHub Actions