[ https://issues.apache.org/jira/browse/SPARK-28024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16869879#comment-16869879 ]
Marco Gaido commented on SPARK-28024: ------------------------------------- [~joshrosen] thanks for linking them, Yes, I did try having them in, because it is a very confusing and unexpected behavior for many users, especially when migrating workloads from other SQL systems. Moreover, having them as configs lets users choose the behavior they prefer. But I received negative feedbacks on them as you can see. I hope that since there have been several other people sustaining this is a problem, those PRs may be reconsidered. Moreover, now we're approaching 3.0, so it may be a good moment for them. I am updating them resolving conflicts. This issue may be closed as a duplicate IMHO. Thanks. > Incorrect numeric values when out of range > ------------------------------------------ > > Key: SPARK-28024 > URL: https://issues.apache.org/jira/browse/SPARK-28024 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.0.0 > Reporter: Yuming Wang > Priority: Critical > Labels: correctness > Attachments: SPARK-28024.png > > > For example > Case 1: > {code:sql} > select tinyint(128) * tinyint(2); -- 0 > select smallint(2147483647) * smallint(2); -- -2 > select int(2147483647) * int(2); -- -2 > SELECT smallint((-32768)) * smallint(-1); -- -32768 > {code} > Case 2: > {code:sql} > spark-sql> select cast('10e-70' as float), cast('-10e-70' as float); > 0.0 -0.0 > {code} > Case 3: > {code:sql} > spark-sql> select cast('10e-400' as double), cast('-10e-400' as double); > 0.0 -0.0 > {code} > Case 4: > {code:sql} > spark-sql> select exp(-1.2345678901234E200); > 0.0 > postgres=# select exp(-1.2345678901234E200); > ERROR: value overflows numeric format > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org