Skip to content

Commit e021f8b

Browse files
itholicHyukjinKwon
authored andcommitted
[SPARK-40419][SQL][TESTS][FOLLOW-UP] Fix test to skip when package is unavailable
### What changes were proposed in this pull request? This PR follow-up for apache#37873. The UDAF test should be skipped when pyspark, pandas and/or pyarrow is unavailable with proper message. ### Why are the changes needed? Skip the test properly when it's unavailable. ### Does this PR introduce _any_ user-facing change? No, it's test only. ### How was this patch tested? Manually test to be skipped when missing package. ![Screen Shot 2022-09-20 at 6 11 30 PM](https://user-images.githubusercontent.com/44108233/191218078-254605b4-157e-4e22-8015-22399ff5e0b2.png) Closes apache#37946 from itholic/SPARK-40419-followup. Authored-by: itholic <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent eee6e45 commit e021f8b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala

+7
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession with SQLHelper
256256
s"pandas and/or pyarrow were not available in [$pythonExec].") {
257257
/* Do nothing */
258258
}
259+
case udfTestCase: UDFTest
260+
if udfTestCase.udf.isInstanceOf[TestGroupedAggPandasUDF] &&
261+
!shouldTestGroupedAggPandasUDFs =>
262+
ignore(s"${testCase.name} is skipped because pyspark," +
263+
s"pandas and/or pyarrow were not available in [$pythonExec].") {
264+
/* Do nothing */
265+
}
259266
case _ =>
260267
// Create a test case to run this case.
261268
test(testCase.name) {

0 commit comments

Comments
 (0)