You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/10/31 14:52:58 UTC
[jira] [Assigned] (SPARK-18179) Throws analysis exception with a
proper message for unsupported argument types in reflect/java_method
function
[ https://issues.apache.org/jira/browse/SPARK-18179?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-18179:
------------------------------------
Assignee: Apache Spark
> Throws analysis exception with a proper message for unsupported argument types in reflect/java_method function
> --------------------------------------------------------------------------------------------------------------
>
> Key: SPARK-18179
> URL: https://issues.apache.org/jira/browse/SPARK-18179
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Reporter: Hyukjin Kwon
> Assignee: Apache Spark
> Priority: Minor
>
> {code}
> scala> spark.range(1).selectExpr("reflect('java.lang.String', 'valueOf', cast('1990-01-01' as timestamp))")
> {code}
> throws an exception as below:
> {code}
> java.util.NoSuchElementException: key not found: TimestampType
> at scala.collection.MapLike$class.default(MapLike.scala:228)
> at scala.collection.AbstractMap.default(Map.scala:59)
> at scala.collection.MapLike$class.apply(MapLike.scala:141)
> at scala.collection.AbstractMap.apply(Map.scala:59)
> at org.apache.spark.sql.catalyst.expressions.CallMethodViaReflection$$anonfun$findMethod$1$$anonfun$apply$1.apply(CallMethodViaReflection.scala:159)
> at org.apache.spark.sql.catalyst.expressions.CallMethodViaReflection$$anonfun$findMethod$1$$anonfun$apply$1.apply(CallMethodViaReflection.scala:158)
> at scala.collection.IndexedSeqOptimized$class.prefixLengthImpl(IndexedSeqOptimized.scala:38)
> {code}
> We should throw analysis exception with a better message when the types are unsupported rather than {{java.util.NoSuchElementException: key not found: TimestampType}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org