wjones127 commented on issue #5793: URL: https://github.com/apache/arrow-rs/issues/5793#issuecomment-2359709004
It's not clear to me that the original behavior is bad. It seems like it is casting numerically. That is, `2` is being translated into `2.0000` for `decimal(10, 4)` and `0` for `decimal(10, -4)`. Numerically, those seem to be the closest values representable in those types. It seems like what you are suggesting is casting uses the integer as the internal integer representation and then attaches the scale blindly. So `2` would be translated to `0.0002` for `decimal(10, 4)` and `2000` for `decimal(10, -4)`. That seems like more surprising behavior to me. Am I understanding your suggestion correctly? Is there a SQL system that sets some precedent for how this work? For example, how does postgres do this? -- 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]
