Hi! I am interested in having cast from Decimal to Int in pyarrow.
I have couple ideas but I am a newbie so I might be wrong: Do I understand correctly that the problem lies in the fact that CastFunctor knows nothing about decimal scale? Were there any ideas how to handle this properly? My ideas are not that great but maybe one of them would be OK: 1. We can pass 'numeric_scale_shift' or 'decimal_scale_shift' in CastOptions. Then while casting, then numbers would be scaled properly. 2. Pass byte group selector in CastOptions i.e. when casting from N*M bytes to N bytes we can pick any of the M groups 3. Do not modify cast but add scale/multiply compute kernel so we can apply it explicitly prior to casting What do you think? I like 1 most 2 least. Would any of this solutions be accepted into the code? I do not want to work on something that would be rejected immediately... Thanks for any input provided, Jacek