Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17956#discussion_r116284193
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/json/JsonSuite.scala
 ---
    @@ -1988,4 +1989,55 @@ class JsonSuite extends QueryTest with 
SharedSQLContext with TestJsonData {
           assert(errMsg.startsWith("The field for corrupt records must be 
string type and nullable"))
         }
       }
    +
    +  test("SPARK-18772: Parse special floats correctly") {
    +    val jsons = Seq(
    +      """{"a": "+INF"}""",
    +      """{"a": "INF"}""",
    +      """{"a": "-INF"}""",
    +      """{"a": "NaN"}""",
    +      """{"a": "+NaN"}""",
    +      """{"a": "-NaN"}""",
    +      """{"a": "Infinity"}""",
    +      """{"a": "+Infinity"}""",
    +      """{"a": "-Infinity"}""")
    --- End diff --
    
    It sounds like Jackson only support the following four cases. 
    
    ```Scala
        val jsons = Seq(
          """{"a": NaN}""",
          """{"a": Infinity}""",
          """{"a": +Infinity}""",
          """{"a": -Infinity}""")
    ```
    
    Could you add a separate test case for them? Also add the negative cases 
too.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to