diff options
author | Andy Grove <andygrove73@gmail.com> | 2016-01-25 09:22:10 +0000 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-01-25 09:22:10 +0000 |
commit | d8e480521e362bc6bc5d8ebcea9b2d50f72a71b9 (patch) | |
tree | 959542af2399e75d9f342a0a1e403f948e5ba5c0 | |
parent | 3adebfc9a37fdee5b7a4e891c4ee597b85f824c3 (diff) | |
download | spark-d8e480521e362bc6bc5d8ebcea9b2d50f72a71b9.tar.gz spark-d8e480521e362bc6bc5d8ebcea9b2d50f72a71b9.tar.bz2 spark-d8e480521e362bc6bc5d8ebcea9b2d50f72a71b9.zip |
[SPARK-12932][JAVA API] improved error message for java type inference failure
Author: Andy Grove <andygrove73@gmail.com>
Closes #10865 from andygrove/SPARK-12932.
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala index b5de60cdb7..3c3717d504 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/JavaTypeInference.scala @@ -406,7 +406,8 @@ object JavaTypeInference { expressions.Literal(fieldName) :: extractorFor(fieldValue, fieldType) :: Nil }) } else { - throw new UnsupportedOperationException(s"no encoder found for ${other.getName}") + throw new UnsupportedOperationException( + s"Cannot infer type for class ${other.getName} because it is not bean-compliant") } } } |