From 10173279305a0e8a62bfbfe7a9d5d1fd558dd8e1 Mon Sep 17 00:00:00 2001 From: Herman van Hovell Date: Wed, 20 Jan 2016 15:13:01 -0800 Subject: [SPARK-12848][SQL] Change parsed decimal literal datatype from Double to Decimal The current parser turns a decimal literal, for example ```12.1```, into a Double. The problem with this approach is that we convert an exact literal into a non-exact ```Double```. The PR changes this behavior, a Decimal literal is now converted into an extact ```BigDecimal```. The behavior for scientific decimals, for example ```12.1e01```, is unchanged. This will be converted into a Double. This PR replaces the ```BigDecimal``` literal by a ```Double``` literal, because the ```BigDecimal``` is the default now. You can use the double literal by appending a 'D' to the value, for instance: ```3.141527D``` cc davies rxin Author: Herman van Hovell Closes #10796 from hvanhovell/SPARK-12848. --- .../test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/hive/src/test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a (limited to 'sql/hive/src/test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a') diff --git a/sql/hive/src/test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a b/sql/hive/src/test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a new file mode 100644 index 0000000000..cd5ac039d6 --- /dev/null +++ b/sql/hive/src/test/resources/golden/1.0 + 1S-0-9f93538c38920d52b322bfc40cc2f31a @@ -0,0 +1 @@ +2.0 -- cgit v1.2.3