[ https://issues.apache.org/jira/browse/SPARK-39238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manu Zhang updated SPARK-39238: ------------------------------- Description: The result of following SQL is 1.00 while 1.00000000000000000000 is expected {code:java} CREATE OR REPLACE TEMPORARY VIEW t3 AS VALUES (decimal(1)) tbl(v) CREATE OR REPLACE TEMPORARY VIEW t4 AS SELECT CAST(v AS DECIMAL(18, 2)) AS v FROM t3; SELECT CAST(1 AS DECIMAL(28, 2)) UNION ALL SELECT v / v FROM t4; {code} was: The result of following SQL is 1.00 while 1.00000000000000000000 is expected {code:java} CREATE OR REPLACE TEMPORARY VIEW t4 AS SELECT CAST(v AS DECIMAL(18, 2)) AS v FROM t3; SELECT v / v FROM t4; SELECT CAST(1 AS DECIMAL(28, 2)) UNION ALL SELECT v / v FROM t4; {code} > Decimal precision loss from applying WidenSetOperationTypes before > DecimalPrecision > ------------------------------------------------------------------------------------ > > Key: SPARK-39238 > URL: https://issues.apache.org/jira/browse/SPARK-39238 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.1 > Reporter: Manu Zhang > Priority: Major > > The result of following SQL is 1.00 while 1.00000000000000000000 is expected > {code:java} > CREATE OR REPLACE TEMPORARY VIEW t3 AS VALUES (decimal(1)) tbl(v) > CREATE OR REPLACE TEMPORARY VIEW t4 AS SELECT CAST(v AS DECIMAL(18, 2)) AS v > FROM t3; > SELECT CAST(1 AS DECIMAL(28, 2)) > UNION ALL > SELECT v / v FROM t4; {code} -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org