Zhang Jianguo created SPARK-33958: ------------------------------------- Summary: spark sql DoubleType(0 * (-1)) return "-0.0" Key: SPARK-33958 URL: https://issues.apache.org/jira/browse/SPARK-33958 Project: Spark Issue Type: Bug Components: Spark Core Affects Versions: 3.0.0, 2.4.5, 2.3.2 Reporter: Zhang Jianguo
spark version: 2.3.2 ```sql create table test_zjg(a double); insert into test_zjg values(-1.0); select a*0 from test_zjg ``` After select operation, we will get -0.0 which expected as 0.0: +--------------------------+ | (a * CAST(0 AS DOUBLE)) | +--------------------------+ | -0.0 | +--------------------------+ -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org