Github user ueshin commented on a diff in the pull request: https://github.com/apache/spark/pull/21990#discussion_r225077270 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala --- @@ -1136,4 +1121,27 @@ object SparkSession extends Logging { SparkSession.clearDefaultSession() } } + + /** + * Initialize extensions if the user has defined a configurator class in their SparkConf. + * This class will be applied to the extensions passed into this function. + */ + private[sql] def applyExtensionsFromConf(conf: SparkConf, extensions: SparkSessionExtensions) { --- End diff -- How about returning `SparkSessionExtensions` from this method, and modifying the secondary constructor of `SparkSession` as: ```scala private[sql] def this(sc: SparkContext) { this(sc, None, None, SparkSession.applyExtensionsFromConf(sc.getConf, new SparkSessionExtensions)) } ``` I'm a little worried whether the order we apply extensions might affect.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org