You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Kanstantsin Ilchanka (Jira)" <ji...@apache.org> on 2021/11/01 09:29:00 UTC
[jira] [Created] (ARROW-14532) [Ruby] Convert Decimal128 arrays to
Decimal256 when we have precision out of range error
Kanstantsin Ilchanka created ARROW-14532:
--------------------------------------------
Summary: [Ruby] Convert Decimal128 arrays to Decimal256 when we have precision out of range error
Key: ARROW-14532
URL: https://issues.apache.org/jira/browse/ARROW-14532
Project: Apache Arrow
Issue Type: Bug
Reporter: Kanstantsin Ilchanka
I'm tried to multiply 2 Decimal128 arrays with max precision(38) and it fails because precision is out of range. I expected that result should be converted to Decimal256 in such case, what do you think?
{code:java}
a = Arrow::Decimal128ArrayBuilder.build(
Arrow::Decimal128DataType.new(38, 15), [1.1, 2.2, 3.3]
)
b = Arrow::Decimal128ArrayBuilder.build(
Arrow::Decimal128DataType.new(38, 15), [1.1, 2.2, 3.3]
)
Arrow::Function.find('multiply').execute([a, b])
Arrow::Error::Invalid: [function][execute]: Invalid: Decimal precision out of range: 77
Arrow::Function.find('add').execute([a, b])
Arrow::Error::Invalid: [function][execute]: Invalid: Decimal precision out of range: 39{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)