[
https://issues.apache.org/jira/browse/SPARK-25519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Apache Spark reassigned SPARK-25519:
------------------------------------
Assignee: Apache Spark (was: Dilip Biswal)
> ArrayRemove function may return incorrect result when right expression is
> implicitly downcasted.
> ------------------------------------------------------------------------------------------------
>
> Key: SPARK-25519
> URL: https://issues.apache.org/jira/browse/SPARK-25519
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Dilip Biswal
> Assignee: Apache Spark
> Priority: Major
> Fix For: 2.4.0
>
>
> In ArrayRemove, we currently cast the right hand side expression to match the
> element type of the left hand side Array. This may result in down casting and
> may return wrong result or questionable result.
> {code}
> spark-sql> select array_remove(array(1,2,3), 1.23D)
> > ;
> [2,3]
> Time taken: 2.57 seconds, Fetched 1 row(s)
> spark-sql> select array_remove(array(1,2,3), 'foo')
> > ;
> NULL
> {code}
> We should safely coerce both left and right hand side expressions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]