You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Cheng Lian (JIRA)" <ji...@apache.org> on 2015/09/15 01:55:45 UTC

[jira] [Updated] (SPARK-10591) False negative in QueryTest.checkAnswer

     [ https://issues.apache.org/jira/browse/SPARK-10591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cheng Lian updated SPARK-10591:
-------------------------------
    Description: 
# For double and float, {{NaN == NaN}} is always {{false}}
# {{checkAnswer}} doesn't handle {{Map\[K, V\]}} properly. For example:
  {noformat}
  scala> Map(1 -> 2, 2 -> 1).toString
  res0: String = Map(1 -> 2, 2 -> 1)

  scala> Map(2 -> 1, 1 -> 2).toString
  res1: String = Map(2 -> 1, 1 -> 2)
  {noformat}
  We can't rely on {{toString}} to compare {{Map\[K, V\]}} instances.

Need to update {{checkAnswer}} to special case {{NaN}} and {{Map\[K, V\]}}.


  was:
# For double and float, `NaN == NaN` is always `false`
# `checkAnswer` doesn't handle `Map` properly. For example:
  {noformat}
  scala> Map(1 -> 2, 2 -> 1).toString
  res0: String = Map(1 -> 2, 2 -> 1)

  scala> Map(2 -> 1, 1 -> 2).toString
  res1: String = Map(2 -> 1, 1 -> 2)
  {noformat}
  We can't rely on `toString` to compare `Map` instances.

Need to update `checkAnswer` to special case `NaN` and `Map`.



> False negative in QueryTest.checkAnswer
> ---------------------------------------
>
>                 Key: SPARK-10591
>                 URL: https://issues.apache.org/jira/browse/SPARK-10591
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL, Tests
>    Affects Versions: 1.0.2, 1.1.1, 1.2.2, 1.3.1, 1.4.1, 1.5.0
>            Reporter: Cheng Lian
>
> # For double and float, {{NaN == NaN}} is always {{false}}
> # {{checkAnswer}} doesn't handle {{Map\[K, V\]}} properly. For example:
>   {noformat}
>   scala> Map(1 -> 2, 2 -> 1).toString
>   res0: String = Map(1 -> 2, 2 -> 1)
>   scala> Map(2 -> 1, 1 -> 2).toString
>   res1: String = Map(2 -> 1, 1 -> 2)
>   {noformat}
>   We can't rely on {{toString}} to compare {{Map\[K, V\]}} instances.
> Need to update {{checkAnswer}} to special case {{NaN}} and {{Map\[K, V\]}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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