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

    https://github.com/apache/spark/pull/22979#discussion_r232487778
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
 ---
    @@ -149,8 +156,8 @@ class UnivocityParser(
     
         case dt: DecimalType => (d: String) =>
           nullSafeDatum(d, name, nullable, options) { datum =>
    -        val value = new BigDecimal(datum.replaceAll(",", ""))
    -        Decimal(value, dt.precision, dt.scale)
    +        val bigDecimal = 
decimalParser.parse(datum).asInstanceOf[BigDecimal]
    --- End diff --
    
    Ah, right. The previous codes will anyway throw an exception, I see. One 
thing I am a little bit unsure is how much different the behaviour is. For 
instance, looks the previous one handles sign character as well (`+` and `-`).
    
    Let me take a closer look. I think I need to.


---

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

Reply via email to