[ https://issues.apache.org/jira/browse/SPARK-10573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-10573: ------------------------------------ Assignee: (was: Apache Spark) > IndexToString transformSchema adds output field as DoubleType > ------------------------------------------------------------- > > Key: SPARK-10573 > URL: https://issues.apache.org/jira/browse/SPARK-10573 > Project: Spark > Issue Type: Bug > Components: ML > Affects Versions: 1.5.0 > Reporter: Nick Pritchard > > Reproducible example: > {code} > val stage = new IndexToString().setInputCol("input").setOutputCol("output") > val inSchema = StructType(Seq(StructField("input", DoubleType))) > val outSchema = stage.transformSchema(inSchema) > assert(outSchema("output").dataType == StringType) > {code} > The root cause seems to be that it uses {{NominalAttribute.toStructField}} > which assumes {{DoubleType}}. It would probably be better to just use > {{SchemaUtils.appendColumn}} and explicitly set the data type. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org