You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/09/10 02:54:00 UTC
[jira] [Resolved] (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:all-tabpanel ]
Wenchen Fan resolved SPARK-32819.
---------------------------------
Fix Version/s: 3.1.0
Resolution: Fixed
Issue resolved by pull request 29698
[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: Major
> Fix For: 3.1.0
>
>
> 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