Github user MrBago commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19997#discussion_r157325083
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -44,6 +44,7 @@
     import numpy as np
     from numpy import abs, all, arange, array, array_equal, inf, ones, tile, 
zeros
     import inspect
    +import py4j
    --- End diff --
    
    On the line below, we catch `except py4j.protocol.Py4JError` errors so that 
we can then raise SkipTest instead, but if we don't import `py4j` we get a 
`NameError` instead of skipping the test. Furthermore, because we don't trigger 
`tearDownClass()` on the following line we leave behind stale state which 
causes other tests to fail. The `except` line is only ever triggered in 
environments that don't have Hive.
    
    
https://github.com/apache/spark/pull/19997/files#diff-4a75aace12688903bc8f97e7930622f4R1868


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to