You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/14 13:40:37 UTC

[GitHub] ala opened a new pull request #23789: [SPARK-26878] QueryTest.compare() does not handle maps with array keys correctly

ala opened a new pull request #23789: [SPARK-26878] QueryTest.compare() does not handle maps with array keys correctly
URL: https://github.com/apache/spark/pull/23789
 
 
   ## What changes were proposed in this pull request?
   
   The previous strategy for comparing Maps leveraged sorting (key, value) tuples by their _.toString. However, the _.toString representation of an arrays has nothing to do with it's content. If a map has array keys, it's content would be compared with other maps essentially at random. This could results in false negatives in tests.
   
   This changes first compares keys together to find the matching ones, and then compares associated values.
   
   ## How was this patch tested?
   
   New unit test added.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org