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/10/27 05:42:21 UTC

[spark] branch master updated: [SPARK-34265][SQL][TESTS][FOLLOW-UP] Add assume for PythonUDF test case in Scala side

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 215eb853ad7 [SPARK-34265][SQL][TESTS][FOLLOW-UP] Add assume for PythonUDF test case in Scala side
215eb853ad7 is described below

commit 215eb853ad7a609443126eeef26188557a7ddb0e
Author: Hyukjin Kwon <gu...@apache.org>
AuthorDate: Thu Oct 27 14:42:08 2022 +0900

    [SPARK-34265][SQL][TESTS][FOLLOW-UP] Add assume for PythonUDF test case in Scala side
    
    ### What changes were proposed in this pull request?
    
    This PR adds `assume` in the Python test added in https://github.com/apache/spark/pull/33559.
    
    ### Why are the changes needed?
    
    In some testing environment, Python does not exist. This is consistent with other tests in this file. Otherwise, it'd fails as below:
    
    ```
            java.lang.RuntimeException: Python availability: [true], pyspark availability: [false]
          at org.apache.spark.sql.IntegratedUDFTestUtils$.pythonFunc$lzycompute(IntegratedUDFTestUtils.scala:192)
          at org.apache.spark.sql.IntegratedUDFTestUtils$.org$apache$spark$sql$IntegratedUDFTestUtils$$pythonFunc(IntegratedUDFTestUtils.scala:172)
          at org.apache.spark.sql.IntegratedUDFTestUtils$TestPythonUDF$$anon$1.<init>(IntegratedUDFTestUtils.scala:337)
          at org.apache.spark.sql.IntegratedUDFTestUtils$TestPythonUDF.udf$lzycompute(IntegratedUDFTestUtils.scala:334)
          at org.apache.spark.sql.IntegratedUDFTestUtils$TestPythonUDF.udf(IntegratedUDFTestUtils.scala:334)
          at org.apache.spark.sql.IntegratedUDFTestUtils$TestPythonUDF.apply(IntegratedUDFTestUtils.scala:359)
          at org.apache.spark.sql.execution.python.PythonUDFSuite.$anonfun$new$11(PythonUDFSuite.scala:105)
    ...
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, test-only.
    
    ### How was this patch tested?
    
    Manually checked.
    
    Closes #38407 from HyukjinKwon/SPARK-34265.
    
    Authored-by: Hyukjin Kwon <gu...@apache.org>
    Signed-off-by: Hyukjin Kwon <gu...@apache.org>
---
 .../scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala
index 7850b2d79b0..32f50c1705d 100644
--- a/sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala
+++ b/sql/core/src/test/scala/org/apache/spark/sql/execution/python/PythonUDFSuite.scala
@@ -86,7 +86,7 @@ class PythonUDFSuite extends QueryTest with SharedSparkSession {
   }
 
   test("SPARK-34265: Instrument Python UDF execution using SQL Metrics") {
-
+    assume(shouldTestPythonUDFs)
     val pythonSQLMetrics = List(
       "data sent to Python workers",
       "data returned from Python workers",


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