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: [email protected]
For additional commands, e-mail: [email protected]