[ https://issues.apache.org/jira/browse/SPARK-52461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mihailo Aleksic updated SPARK-52461: ------------------------------------ Description: When coercing an expression from DecimalType to DecimalType, remove the inner Cast if it is not user-specified one and if the outer DecimalType is wider than inner (precision and scale are greater) - or in other words, if it is redundant. Do that only in case SQLConf.COLLAPSE_INNER_CAST_TO_DECIMAL value is true. This is needed to make single-pass and fixed-point implementations compatible. was:When coercing an expression from DecimalType to DecimalType, remove the inner Cast if it is not user-specified one and if the outer DecimalType is wider than inner (precision and scale are greater) - or in other words, if it is redundant. Do that only in case SQLConf.COLLAPSE_INNER_CAST_TO_DECIMAL value is true. > Collapse inner Cast from DecimalType to DecimalType > --------------------------------------------------- > > Key: SPARK-52461 > URL: https://issues.apache.org/jira/browse/SPARK-52461 > Project: Spark > Issue Type: Improvement > Components: SQL > Affects Versions: 4.1.0 > Reporter: Mihailo Aleksic > Priority: Major > > When coercing an expression from DecimalType to DecimalType, remove the inner > Cast if it is not user-specified one and if the outer DecimalType is wider > than inner (precision and scale are greater) - or in other words, if it is > redundant. Do that only in case SQLConf.COLLAPSE_INNER_CAST_TO_DECIMAL value > is true. > This is needed to make single-pass and fixed-point implementations compatible. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org