You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2022/09/20 09:20:19 UTC

[spark] branch master updated: [SPARK-40419][SQL][TESTS][FOLLOW-UP] Fix test to skip when package is unavailable

This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new e021f8b767c [SPARK-40419][SQL][TESTS][FOLLOW-UP] Fix test to skip when package is unavailable
e021f8b767c is described below

commit e021f8b767c7b382fa2f86d0e655b62ff1c85ffc
Author: itholic <ha...@databricks.com>
AuthorDate: Tue Sep 20 18:19:59 2022 +0900

    [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 https://github.com/apache/spark/pull/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 #37946 from itholic/SPARK-40419-followup.
    
    Authored-by: itholic <ha...@databricks.com>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .../src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala    | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
index 5af7fa3898d..83980535f87 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala
@@ -256,6 +256,13 @@ class SQLQueryTestSuite extends QueryTest with SharedSparkSession with SQLHelper
           s"pandas and/or pyarrow were not available in [$pythonExec].") {
           /* Do nothing */
         }
+      case udfTestCase: UDFTest
+          if udfTestCase.udf.isInstanceOf[TestGroupedAggPandasUDF] &&
+            !shouldTestGroupedAggPandasUDFs =>
+        ignore(s"${testCase.name} is skipped because pyspark," +
+          s"pandas and/or pyarrow were not available in [$pythonExec].") {
+          /* Do nothing */
+        }
       case _ =>
         // Create a test case to run this case.
         test(testCase.name) {


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