Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/22979#discussion_r235588064
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVExprUtils.scala
---
@@ -79,4 +83,22 @@ object CSVExprUtils {
throw new IllegalArgumentException(s"Delimiter cannot be more than
one character: $str")
}
}
+
+ def getDecimalParser(useLegacyParser: Boolean, locale: Locale): String
=> java.math.BigDecimal = {
+ if (useLegacyParser) {
+ (s: String) => new BigDecimal(s.replaceAll(",", ""))
+ } else {
+ val df = new DecimalFormat("", new DecimalFormatSymbols(locale))
--- End diff --
let's name `df` `decimalFormat` ..
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]