You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2019/09/10 23:45:00 UTC

[jira] [Assigned] (SPARK-29026) Improve error message when constructor in `ScalaReflection` isn't found

     [ https://issues.apache.org/jira/browse/SPARK-29026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon reassigned SPARK-29026:
------------------------------------

    Assignee: Mick Jermsurawong

> Improve error message when constructor in `ScalaReflection` isn't found  
> -------------------------------------------------------------------------
>
>                 Key: SPARK-29026
>                 URL: https://issues.apache.org/jira/browse/SPARK-29026
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.4.4
>            Reporter: Mick Jermsurawong
>            Assignee: Mick Jermsurawong
>            Priority: Minor
>
> Currently, a method to get constructor parameters from a given type `constructParams` in `ScalaReflection` will throw exception if the type has no constructor 
> {code:java}
> <none> is not a term
> scala.ScalaReflectionException:  {code}
> In the normal usage of ExpressionEncoder, this can happen if the type is interface extending `scala.Product`.
> Also, since this is a protected method, this could have been other arbitrary types without constructor.
> To reproduce the error, the following will fail when trying to get {{Encoder[NoConstructorProductTrait]}} 
> {code:java}
> trait NoConstructorProductTrait extends scala.Product {} {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

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