You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Kouhei Sutou (Jira)" <ji...@apache.org> on 2021/11/01 20:50:00 UTC
[jira] [Updated] (ARROW-14532) [C++] Convert Decimal128 arrays to
Decimal256 when we have precision out of range error
[ https://issues.apache.org/jira/browse/ARROW-14532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kouhei Sutou updated ARROW-14532:
---------------------------------
Summary: [C++] Convert Decimal128 arrays to Decimal256 when we have precision out of range error (was: [Ruby] Convert Decimal128 arrays to Decimal256 when we have precision out of range error)
> [C++] 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
> Priority: Minor
>
> 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)