caoxuewen created SPARK-20850:
---------------------------------
Summary: Improve division and multiplication mixing process the
data
Key: SPARK-20850
URL: https://issues.apache.org/jira/browse/SPARK-20850
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.2.0
Reporter: caoxuewen
spark-sql> select (1234567890123456789012 / 12345678901234567890120) *
12345678901234567890120;
NULL
spark-sql> select (12345678901234567890 / 123) * 123;
NULL
when the length of the getText is greater than 19, The result is not what we
expected.
but mysql handle the value is ok.
mysql> select (1234567890123456789012 / 12345678901234567890120) *
12345678901234567890120;
+------------------------------------------------------------------------------+
| (1234567890123456789012 / 12345678901234567890120) * 12345678901234567890120 |
+------------------------------------------------------------------------------+
| 1234567890123456789012.0000 |
+------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select (12345678901234567890 / 123) * 123;
+------------------------------------+
| (12345678901234567890 / 123) * 123 |
+------------------------------------+
| 12345678901234567890.0000 |
+------------------------------------+
1 row in set (0.00 sec)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]