Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.spark.sql

import java.beans.Introspector
import java.io.Closeable
import java.util.concurrent.atomic.AtomicReference

import scala.collection.JavaConverters._
Expand Down Expand Up @@ -72,7 +73,7 @@ import org.apache.spark.util.Utils
class SparkSession private(
@transient val sparkContext: SparkContext,
@transient private val existingSharedState: Option[SharedState])
extends Serializable with Logging { self =>
extends Serializable with Closeable with Logging { self =>

private[sql] def this(sc: SparkContext) {
this(sc, None)
Expand Down Expand Up @@ -647,6 +648,13 @@ class SparkSession private(
sparkContext.stop()
}

/**
* Synonym for `stop()`.
*
* @since 2.2.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah fixed it in a follow up.

*/
override def close(): Unit = stop()

/**
* Parses the data type in our internal string representation. The data type string should
* have the same format as the one generated by `toString` in scala.
Expand Down