NobiGo commented on pull request #35220: URL: https://github.com/apache/spark/pull/35220#issuecomment-1014426755
In the Postgresql: ``` CREATE TABLE decimalTable(value numeric(7,2)); INSERT INTO decimalTable(value) VALUES (12.34); INSERT INTO decimalTable(value) VALUES (12.45); INSERT INTO decimalTable(value) VALUES (12.55); select value::decimal(5,1)::decimal(4,2) from decimalTable; ``` ``` value 12.30 12.50 12.60 ``` If we simplify this cast to value::decimal(4,2) The value will be: ``` value 12.34 12.45 12.55 ``` The result will be different. So it is reasonable or acceptable in Spark? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
