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

    https://github.com/apache/spark/pull/13599#discussion_r160069167
  
    --- Diff: 
core/src/main/scala/org/apache/spark/api/python/PythonWorkerFactory.scala ---
    @@ -60,6 +66,12 @@ private[spark] class PythonWorkerFactory(pythonExec: 
String, envVars: Map[String
         envVars.getOrElse("PYTHONPATH", ""),
         sys.env.getOrElse("PYTHONPATH", ""))
     
    +
    +  if (virtualEnvEnabled) {
    +    val virtualEnvFactory = new VirtualEnvFactory(pythonExec, conf, false)
    +    pythonExec = virtualEnvFactory.setupVirtualEnv()
    --- End diff --
    
    Rather than updating a var what about if we created a new val which is set 
to the value passed in if virtualEnvEnabled is false or this new value if its 
true?


---

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

Reply via email to