You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by BenFradet <be...@gmail.com> on 2015/11/20 23:39:33 UTC

Unhandled case in VectorAssembler

Hey there,

I noticed that there is an unhandled case in the transform method of
VectorAssembler if one of the input columns doesn't have one of the
supported type DoubleType, NumericType, BooleanType or VectorUDT.

So, if you try to transform a column of StringType you get a cryptic
"scala.MatchError: StringType".
I was wondering if we shouldn't throw a custom exception indicating that
this is not a supported type.

I can submit a jira and pr if needed.

Best regards,
Ben.




--
View this message in context: http://apache-spark-developers-list.1001551.n3.nabble.com/Unhandled-case-in-VectorAssembler-tp15302.html
Sent from the Apache Spark Developers List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
For additional commands, e-mail: dev-help@spark.apache.org


Re: Unhandled case in VectorAssembler

Posted by Benjamin Fradet <be...@gmail.com>.
Will do, thanks for your input.
On 21 Nov 2015 2:42 a.m., "Joseph Bradley" <jo...@databricks.com> wrote:

> Yes, please, could you send a JIRA (and PR)?  A custom error message would
> be better.
> Thank you!
> Joseph
>
> On Fri, Nov 20, 2015 at 2:39 PM, BenFradet <be...@gmail.com>
> wrote:
>
>> Hey there,
>>
>> I noticed that there is an unhandled case in the transform method of
>> VectorAssembler if one of the input columns doesn't have one of the
>> supported type DoubleType, NumericType, BooleanType or VectorUDT.
>>
>> So, if you try to transform a column of StringType you get a cryptic
>> "scala.MatchError: StringType".
>> I was wondering if we shouldn't throw a custom exception indicating that
>> this is not a supported type.
>>
>> I can submit a jira and pr if needed.
>>
>> Best regards,
>> Ben.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-spark-developers-list.1001551.n3.nabble.com/Unhandled-case-in-VectorAssembler-tp15302.html
>> Sent from the Apache Spark Developers List mailing list archive at
>> Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
>> For additional commands, e-mail: dev-help@spark.apache.org
>>
>>
>

Re: Unhandled case in VectorAssembler

Posted by Joseph Bradley <jo...@databricks.com>.
Yes, please, could you send a JIRA (and PR)?  A custom error message would
be better.
Thank you!
Joseph

On Fri, Nov 20, 2015 at 2:39 PM, BenFradet <be...@gmail.com>
wrote:

> Hey there,
>
> I noticed that there is an unhandled case in the transform method of
> VectorAssembler if one of the input columns doesn't have one of the
> supported type DoubleType, NumericType, BooleanType or VectorUDT.
>
> So, if you try to transform a column of StringType you get a cryptic
> "scala.MatchError: StringType".
> I was wondering if we shouldn't throw a custom exception indicating that
> this is not a supported type.
>
> I can submit a jira and pr if needed.
>
> Best regards,
> Ben.
>
>
>
>
> --
> View this message in context:
> http://apache-spark-developers-list.1001551.n3.nabble.com/Unhandled-case-in-VectorAssembler-tp15302.html
> Sent from the Apache Spark Developers List mailing list archive at
> Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@spark.apache.org
> For additional commands, e-mail: dev-help@spark.apache.org
>
>