spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph K. Bradley (JIRA)" <>
Subject [jira] [Commented] (SPARK-12711) ML StopWordsRemover does not protect itself from column name duplication
Date Fri, 08 Jan 2016 20:08:39 GMT


Joseph K. Bradley commented on SPARK-12711:

You're correct that it should prevent column name duplication.  I'd recommend using SchemaUtils.appendColumn:

That will be great if you can send a PR to fix this.  Thanks!

By the way, please don't set the target version; committers or component maintainers will
set that.

> ML StopWordsRemover does not protect itself from column name duplication
> ------------------------------------------------------------------------
>                 Key: SPARK-12711
>                 URL:
>             Project: Spark
>          Issue Type: Bug
>          Components: ML, MLlib
>    Affects Versions: 1.6.0
>            Reporter: Grzegorz Chilkiewicz
>            Priority: Trivial
>              Labels: ml, mllib, newbie, suggestion
> At work we were 'taking a closer look' at ML transformers&estimators and I spotted
that anomally.
> On first look, resolution looks simple:
> Add to StopWordsRemover.transformSchema line (as is done in e.g. PCA.transformSchema,
StandardScaler.transformSchema, OneHotEncoder.transformSchema):
> {code}
> require(!schema.fieldNames.contains($(outputCol)), s"Output column ${$(outputCol)} already
> {code}
> Am I correct? Is that a bug?    If yes - I am willing to prepare an appropriate pull
> Maybe a better idea is to make use of super.transformSchema in StopWordsRemover (and
possibly in all other places)?
> Links to files at github, mentioned above:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message