dioptre commented on PR #40729: URL: https://github.com/apache/arrow/pull/40729#issuecomment-2021126172
@domoritz as far as I can tell the decimal binary storage stores only an integer. The arrow metadata / schema dictates the scale and precision. These are integer values per this description: https://www.logicbig.com/quick-info/programming/precision-and-scale.html I haven't read anything about arrow storing any metadata in the hex like most other decimal systems do, and it seems to come through only the parent metadata / schema. Combining the schema, and the BN (Arrow's BigNum) we get the actual number. The scale must be an integer per the link above. So the test you shared is invalid I believe. We ended up going with scale in the valueOf function after your feedback instead of the denominator as I originally suggested. This requires us to ```10^scale``` for each function result. It's obviously a bit slower but hopefully makes more sense for users. -- 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]
