spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-32819) Spark SQL aggregate() fails on nested string arrays
Date Thu, 10 Sep 2020 05:09:00 GMT

    [ https://issues.apache.org/jira/browse/SPARK-32819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17193374#comment-17193374
] 

Apache Spark commented on SPARK-32819:
--------------------------------------

User 'viirya' has created a pull request for this issue:
https://github.com/apache/spark/pull/29705

> 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
>            Assignee: L. C. Hsieh
>            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


Mime
View raw message