Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
avoid API change
  • Loading branch information
yaooqinn committed May 12, 2021
commit 4e84a6fb767fb2dfdb1d3f5664038c3eccbd95e2
11 changes: 11 additions & 0 deletions sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,17 @@ object SparkSession extends Logging {
*
* @since 2.2.0
*/
def withExtensions(f: SparkSessionExtensions => Unit): Builder = synchronized {
f(extensions)
this
}

/**
* Inject extensions into the [[SparkSession]]. This allows a user to add Analyzer rules,
* Optimizer rules, Planning Strategies or a customized parser.
*
* @since 3.2.0
*/
def withExtensions(f: SparkSessionExtensionsProvider): Builder = synchronized {
f(extensions)
this
Expand Down