huaxingao commented on a change in pull request #27094:
[SPARK-30419][ML][PySpark] Make IsotonicRegression extend Regressor
URL: https://github.com/apache/spark/pull/27094#discussion_r363046502
##########
File path: project/MimaExcludes.scala
##########
@@ -465,7 +465,15 @@ object MimaExcludes {
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.deploy.SparkHadoopUtil.appendS3AndSparkHadoopConfigurations"),
// [SPARK-29348] Add observable metrics.
-
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.StreamingQueryProgress.this")
+
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.StreamingQueryProgress.this"),
+
+ // [SPARK-30419][ML] Make IsotonicRegression extend Regressor
+
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.fit"),
+
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.setFeaturesCol"),
Review comment:
I was confused as well when I first saw the Mima errors lol
Here are the Mima errors:
```
[error] * method
fit(org.apache.spark.sql.Dataset)org.apache.spark.ml.regression.IsotonicRegressionModel
in class org.apache.spark.ml.regression.IsotonicRegression has a different
result type in current version, where it is org.apache.spark.ml.Model rather
than org.apache.spark.ml.regression.IsotonicRegressionModel
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.fit")
[error] * method
setFeaturesCol(java.lang.String)org.apache.spark.ml.regression.IsotonicRegression
in class org.apache.spark.ml.regression.IsotonicRegression has a different
result type in current version, where it is org.apache.spark.ml.Predictor
rather than org.apache.spark.ml.regression.IsotonicRegression
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.setFeaturesCol")
[error] * method
setLabelCol(java.lang.String)org.apache.spark.ml.regression.IsotonicRegression
in class org.apache.spark.ml.regression.IsotonicRegression has a different
result type in current version, where it is org.apache.spark.ml.Predictor
rather than org.apache.spark.ml.regression.IsotonicRegression
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.setLabelCol")
[error] * method
setPredictionCol(java.lang.String)org.apache.spark.ml.regression.IsotonicRegression
in class org.apache.spark.ml.regression.IsotonicRegression has a different
result type in current version, where it is org.apache.spark.ml.Predictor
rather than org.apache.spark.ml.regression.IsotonicRegression
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegression.setPredictionCol")
[error] * method
setFeaturesCol(java.lang.String)org.apache.spark.ml.regression.IsotonicRegressionModel
in class org.apache.spark.ml.regression.IsotonicRegressionModel has a
different result type in current version, where it is
org.apache.spark.ml.PredictionModel rather than
org.apache.spark.ml.regression.IsotonicRegressionModel
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegressionModel.setFeaturesCol")
[error] * method
setPredictionCol(java.lang.String)org.apache.spark.ml.regression.IsotonicRegressionModel
in class org.apache.spark.ml.regression.IsotonicRegressionModel has a
different result type in current version, where it is
org.apache.spark.ml.PredictionModel rather than
org.apache.spark.ml.regression.IsotonicRegressionModel
[error] filter with:
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.IsotonicRegressionModel.setPredictionCol")
```
The APIs are still the same, but the return types are different. Before the
change, setXXX is in ```IsotonicRegression``` and the return type is
```IsotonicRegression```
```
def setFeaturesCol(value: String): this.type = set(featuresCol, value)
```
After the change, setXXX is in the super class ```Predictor``` and the
return type is ```Predictor```
```
def setFeaturesCol(value: String): Learner = set(featuresCol,
value).asInstanceOf[Learner]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]