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 2021/01/11 13:54:00 UTC
[jira] [Commented] (SPARK-34072) Fix empty array failed in
functions.lit()
[ https://issues.apache.org/jira/browse/SPARK-34072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17262651#comment-17262651 ]
Apache Spark commented on SPARK-34072:
--------------------------------------
User 'ulysses-you' has created a pull request for this issue:
https://github.com/apache/spark/pull/31132
> Fix empty array failed in functions.lit()
> -----------------------------------------
>
> Key: SPARK-34072
> URL: https://issues.apache.org/jira/browse/SPARK-34072
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.2.0
> Reporter: ulysses you
> Priority: Major
>
> We will get exception if we execute code:
> {code:java}
> spark.range(1).select(lit(Array())){code}
> error msg:
> {code:java}
> Exception in thread "main" org.apache.spark.sql.AnalysisException: Unsupported component type class java.lang.Object in arrays;Exception in thread "main" org.apache.spark.sql.AnalysisException: Unsupported component type class java.lang.Object in arrays; at org.apache.spark.sql.catalyst.expressions.Literal$.componentTypeToDataType(literals.scala:129) at org.apache.spark.sql.catalyst.expressions.Literal$.apply(literals.scala:80) at org.apache.spark.sql.catalyst.expressions.Literal$.$anonfun$create$2(literals.scala:148) at scala.util.Failure.getOrElse(Try.scala:222) at org.apache.spark.sql.catalyst.expressions.Literal$.create(literals.scala:148) at org.apache.spark.sql.functions$.typedLit(functions.scala:132) at org.apache.spark.sql.functions$.lit(functions.scala:115)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org