You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Dmitry Chigarev (Jira)" <ji...@apache.org> on 2020/11/03 13:14:00 UTC
[jira] [Updated] (ARROW-10479) [C++][Decimal] Get rid of code
duplication at Decimal
[ https://issues.apache.org/jira/browse/ARROW-10479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dmitry Chigarev updated ARROW-10479:
------------------------------------
Description:
In classes related to Decimal types: [DecimalArray|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/array/array_decimal.cc#L35], [DecimalBuilder|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/array/builder_decimal.cc#L38], [DecimalType|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/type.h#L879], etc, there is a lot of code duplications between decimals with different bit widths.
The proposal here is to create base classes for them, that will contain common logic for decimals of all bit widths.
These changes should simplify adding of new width decimals to C++ part.
> [C++][Decimal] Get rid of code duplication at Decimal
> -----------------------------------------------------
>
> Key: ARROW-10479
> URL: https://issues.apache.org/jira/browse/ARROW-10479
> Project: Apache Arrow
> Issue Type: Sub-task
> Components: C++
> Reporter: Dmitry Chigarev
> Priority: Major
>
> In classes related to Decimal types: [DecimalArray|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/array/array_decimal.cc#L35], [DecimalBuilder|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/array/builder_decimal.cc#L38], [DecimalType|https://github.com/apache/arrow/blob/9f13810d4407d1e2fd83a975c4eb281693e2ca9c/cpp/src/arrow/type.h#L879], etc, there is a lot of code duplications between decimals with different bit widths.
> The proposal here is to create base classes for them, that will contain common logic for decimals of all bit widths.
> These changes should simplify adding of new width decimals to C++ part.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)