GitHub user ueshin opened a pull request:

    https://github.com/apache/spark/pull/20115

    [SPARK-22370][SQL][PYSPARK][FOLLOW-UP] Fix a test failure when xmlrunner is 
installed.

    ## What changes were proposed in this pull request?
    
    This is a follow-up pr of #19587.
    
    If `xmlrunner` is installed, 
`VectorizedUDFTests.test_vectorized_udf_check_config` fails by the following 
error because the `self` which is a subclass of `unittest.TestCase` in the UDF 
`check_records_per_batch` can't be pickled anymore.
    
    ```
    PicklingError: Cannot pickle files that are not opened for reading: w
    ```
    
    This changes the UDF not to refer the `self`.
    
    ## How was this patch tested?
    
    Tested locally.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ueshin/apache-spark issues/SPARK-22370_fup1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/20115.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20115
    
----
commit f078fe655efa0796723f175ff37cf6ec7e26e92c
Author: Takuya UESHIN <ueshin@...>
Date:   2017-12-29T09:01:16Z

    Fix a test failure when xmlrunner is installed.

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to