Spenserrrr commented on PR #57407:
URL: https://github.com/apache/spark/pull/57407#issuecomment-5039350054

   In both `_test()` functions, `sc` is not defined in the file and assigned 
into `globs`, and no doctest in these modules references `sc`. They only use 
`spark`, which is injected via `globs["spark"]`. So, on the except `Py4JError:` 
fallback path, I believe that`SparkSession(sc) `would raise an error that 'sc' 
is not defined.
   The other `_test()` helpers that use the same try/except fallback 
(readwriter.py, observation.py, merge.py) define `sc = SparkContext("local[4]", 
"PythonTest")` before the try. So I added those two lines to the file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to