sadikovi opened a new pull request #34462: URL: https://github.com/apache/spark/pull/34462
### What changes were proposed in this pull request? This PR updates the code in `StructType` to allow merging `DecimalType` values with different precision but the same scale. We could allow merging DecimalType values with different precision if the scale is the same for both types since there should not be any data correctness issues as one of the types will be extended, for example, `DECIMAL(12, 2)` -> `DECIMAL(17, 2)`; however, this is not the case for upcasting when the scale is different - this would depend on the actual values. This also affects Parquet schema merge which is where this issue was discovered originally. ### Why are the changes needed? Fixes the issue of not allowing to consolidate different DecimalTypes when it should be fine to do so in case of the same scale value. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? TODO. -- 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]
