Skip to content

Commit bab8fb2

Browse files
committed
Renaming df to decimalFormat
1 parent 14b5109 commit bab8fb2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVExprUtils.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ object CSVExprUtils {
8888
if (useLegacyParser) {
8989
(s: String) => new BigDecimal(s.replaceAll(",", ""))
9090
} else {
91-
val df = new DecimalFormat("", new DecimalFormatSymbols(locale))
92-
df.setParseBigDecimal(true)
91+
val decimalFormat = new DecimalFormat("", new DecimalFormatSymbols(locale))
92+
decimalFormat.setParseBigDecimal(true)
9393
(s: String) => {
9494
val pos = new ParsePosition(0)
95-
val result = df.parse(s, pos).asInstanceOf[BigDecimal]
95+
val result = decimalFormat.parse(s, pos).asInstanceOf[BigDecimal]
9696
if (pos.getIndex() != s.length() || pos.getErrorIndex() != -1) {
9797
throw new IllegalArgumentException("Cannot parse any decimal");
9898
} else {

0 commit comments

Comments
 (0)