Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12873#discussion_r61993910
  
    --- Diff: repl/scala-2.11/src/main/scala/org/apache/spark/repl/Main.scala 
---
    @@ -94,10 +94,10 @@ object Main extends Logging {
     
       def createSparkSession(): SparkSession = {
         if (SparkSession.hiveClassesArePresent) {
    -      sparkSession = SparkSession.withHiveSupport(sparkContext)
    +      sparkSession = SparkSession.builder.enableHiveSupport().getOrCreate()
    --- End diff --
    
    They are not identical. The previous one will create a new spark session 
anyway, but the new one may not create a new spark session if sparkContext 
already exists. Then we can't guarantee the returned spark session supports 
hive.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to