I have written a code in Spark1.6 which was working fine. However when I converted it to Saprk 2.0. I am getting an error as following:
<console>:56: error: type mismatch;
found : Array[org.apache.spark.ml.feature.QuantileDiscretizer]
required: Array[org.apache.spark.ml.PipelineStage with org.apache.spark.ml.para m.shared.HasOutputCol with org.apache.spark.ml.util.DefaultParamsWritable{def co py(extra: org.apache.spark.ml.param.ParamMap): org.apache.spark.ml.PipelineStage with org.apache.spark.ml.param.shared.HasOutputCol with org.apache.spark.ml.uti l.DefaultParamsWritable{def copy(extra: org.apache.spark.ml.param.ParamMap): org .apache.spark.ml.PipelineStage with org.apache.spark.ml.param.shared.HasOutputCo l with org.apache.spark.ml.util.DefaultParamsWritable}}]
Note: org.apache.spark.ml.feature.QuantileDiscretizer <: org.apache.spark.ml.Pip elineStage with org.apache.spark.ml.param.shared.HasOutputCol with org.apache.sp ark.ml.util.DefaultParamsWritable{def copy(extra: org.apache.spark.ml.param.Para mMap): org.apache.spark.ml.PipelineStage with org.apache.spark.ml.param.shared.H asOutputCol with org.apache.spark.ml.util.DefaultParamsWritable{def copy(extra: org.apache.spark.ml.param.ParamMap): org.apache.spark.ml.PipelineStage with org. apache.spark.ml.param.shared.HasOutputCol with org.apache.spark.ml.util.DefaultP aramsWritable}}, but class Array is invariant in type T.
You may wish to investigate a wildcard type such as `_ <: org.apache.spark.ml.Pi pelineStage with org.apache.spark.ml.param.shared.HasOutputCol with org.apache.s park.ml.util.DefaultParamsWritable{def copy(extra: org.apache.spark.ml.param.Par amMap): org.apache.spark.ml.PipelineStage with org.apache.spark.ml.param.shared. HasOutputCol with org.apache.spark.ml.util.DefaultParamsWritable{def copy(extra: org.apache.spark.ml.param.ParamMap): org.apache.spark.ml.PipelineStage with org .apache.spark.ml.param.shared.HasOutputCol with org.apache.spark.ml.util.Default ParamsWritable}}`. (SLS 3.2.10)