sfc-gh-gfrere commented on issue #43252:
URL: https://github.com/apache/arrow/issues/43252#issuecomment-2822965772

   Hi @khwilson — are you referring to this check?
   
https://github.com/apache/arrow/blob/0cc4855de73777524f1419a7e11ab15ba2abd645/cpp/src/gandiva/decimal_type_util.cc#L59.
 This is intentional to safely account for carry in the product. Or were you 
meaning something else?
   
   Not exactly your question, but has there been discussion around allowing 
higher-precision products/quotients? For example, allowing decimal128(p=38) 
operands to yield higher-precision results (when explicitly permitted), even if 
no further PyArrow operations are supported on those results. Clearly this is 
not safe and strict type abiding which I assume is why it has not been 
implemented.
   
   The idea would be: as long as input operands are within spec, allow 
pc.multiply / pc.divide to produce out-of-bound precision — while attempting 
some safety by restricting follow-up operations or requiring user-managed 
handling. This avoids forced pre-casting operands which potentiates precision 
loss.


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to