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 2020/09/09 19:26:00 UTC
[jira] [Commented] (SPARK-32819) Spark SQL aggregate() fails on
nested string arrays
[ https://issues.apache.org/jira/browse/SPARK-32819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17193140#comment-17193140 ]
Apache Spark commented on SPARK-32819:
--------------------------------------
User 'viirya' has created a pull request for this issue:
https://github.com/apache/spark/pull/29698
> Spark SQL aggregate() fails on nested string arrays
> ---------------------------------------------------
>
> Key: SPARK-32819
> URL: https://issues.apache.org/jira/browse/SPARK-32819
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.0.0
> Environment: Spark 3.0.0 on Databricks (DBR 7.2).
> Reporter: Lauri Koobas
> Priority: Minor
>
> The aggregate() function seems to fail if the initial state is array(array( some string )). Seems to work if it's an INT for example.
> Example that works with a simple array:
> {{select aggregate(split('abcdefgh',''), array(''), (acc, x) -> array( x ) )}}
> Example that works with nested array and INTs:
> {{select aggregate(sequence(0,9), array(array(0)), (acc, x) -> array(array}}{{( x ) ) }}{{)}}
> Example that errors:
> {{select aggregate(split('abcdefgh',''), array(array('')), (acc, x) -> array(array}}{{( x ) ) }}{{)}}
> Producing the following (shortened) error:
> {{data type mismatch: argument 3 requires array<array<string>> type, however ... is of array<array<string>> type.}}
>
--
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