You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Mick Jermsurawong (Jira)" <ji...@apache.org> on 2019/09/09 20:59:00 UTC
[jira] [Created] (SPARK-29026) Improve error message when
constructor in `ScalaReflection` isn't found
Mick Jermsurawong created SPARK-29026:
-----------------------------------------
Summary: 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
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