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 2019/02/18 02:57:00 UTC
[jira] [Resolved] (SPARK-26878) QueryTest.compare does not handle
maps with array keys correctly
[ https://issues.apache.org/jira/browse/SPARK-26878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-26878.
---------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
Issue resolved by pull request 23789
[https://github.com/apache/spark/pull/23789]
> QueryTest.compare does not handle maps with array keys correctly
> ----------------------------------------------------------------
>
> Key: SPARK-26878
> URL: https://issues.apache.org/jira/browse/SPARK-26878
> Project: Spark
> Issue Type: Bug
> Components: SQL, Tests
> Affects Versions: 2.4.0
> Reporter: Ala Luszczak
> Assignee: Ala Luszczak
> Priority: Major
> Fix For: 3.0.0
>
>
> The current strategy for comparing Maps is sorting the (key, value) tuples by _.toString, zipping tuples from both maps together, and then comparing tuples within each of the pairs separately.
> See: https://github.com/apache/spark/blob/ac9c0536bc518f173f2ff53bee42b7a89d28ee20/sql/core/src/test/scala/org/apache/spark/sql/QueryTest.scala#L344-L346
> This is not ideal for byte arrays. The string representations of byte arrays looks like “[B@7d263ddc” and has nothing to do with values actually contained within the array.
> Hence, if a map has byte array keys, then random values get compared with each other, which can result in false negatives.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org