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

    https://github.com/apache/spark/pull/13380#discussion_r65439183
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala ---
    @@ -33,36 +33,34 @@ import org.apache.spark.ml.classification.{OneVsRest, 
OneVsRestModel}
     import org.apache.spark.ml.feature.RFormulaModel
     import org.apache.spark.ml.param.{ParamPair, Params}
     import org.apache.spark.ml.tuning.ValidatorParams
    -import org.apache.spark.sql.{SparkSession, SQLContext}
    +import org.apache.spark.sql.SparkSession
     import org.apache.spark.util.Utils
     
     /**
      * Trait for [[MLWriter]] and [[MLReader]].
      */
     private[util] sealed trait BaseReadWrite {
    -  private var optionSQLContext: Option[SQLContext] = None
    +  private var optionSparkSession: Option[SparkSession] = None
     
       /**
    -   * Sets the SQL context to use for saving/loading.
    +   * Sets the Spark Session to use for saving/loading.
        */
       @Since("1.6.0")
    -  def context(sqlContext: SQLContext): this.type = {
    -    optionSQLContext = Option(sqlContext)
    +  def context(sparkSession: SparkSession): this.type = {
    --- End diff --
    
    I'd prefer to maintain compatibility.  Can you create a new method which 
accepts a SparkSession?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to