diff options
author | Davies Liu <davies@databricks.com> | 2015-08-19 13:43:04 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2015-08-19 13:43:04 -0700 |
commit | e05da5cb5ea253e6372f648fc8203204f2a8df8d (patch) | |
tree | 77fdbe95f20f98f99f7d874c03b3d2ee7ca2380d /sql/catalyst/src | |
parent | f3391ff2b8b9c1f1308755dc223776692e3b7725 (diff) | |
download | spark-e05da5cb5ea253e6372f648fc8203204f2a8df8d.tar.gz spark-e05da5cb5ea253e6372f648fc8203204f2a8df8d.tar.bz2 spark-e05da5cb5ea253e6372f648fc8203204f2a8df8d.zip |
[SPARK-10107] [SQL] fix NPE in format_number
Author: Davies Liu <davies@databricks.com>
Closes #8305 from davies/format_number.
Diffstat (limited to 'sql/catalyst/src')
-rw-r--r-- | sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala index 134f1aa2af..ca044d3e95 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringOperations.scala @@ -1306,8 +1306,8 @@ case class FormatNumber(x: Expression, d: Expression) $df $dFormat = new $df($pattern.toString()); $lastDValue = $d; $numberFormat.applyPattern($dFormat.toPattern()); - ${ev.primitive} = UTF8String.fromString($numberFormat.format(${typeHelper(num)})); } + ${ev.primitive} = UTF8String.fromString($numberFormat.format(${typeHelper(num)})); } else { ${ev.primitive} = null; ${ev.isNull} = true; |