[
https://issues.apache.org/jira/browse/KUDU-721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344417#comment-15344417
]
Will Berkeley commented on KUDU-721:
------------------------------------
[~ted.m] (also [~tlipcon]): I've been working on this, and I'm wondering what
sort of functionality and API your clients want from the Kudu Decimal type.
I've been more-or-less following Todd's rough design doc that he attached above
because I've found it to be a very natural and relatively painless way to add
Decimal. The basic features are
* a decimal(precision, scale) type, with 0 < precision < 39 and 0 <= scale <=
precision (39 digit numbers are the shortest length numbers that don't fit in a
128-bit signed integer type), stored as a signed integer, with precision and
scale a part of the ColumnSchema
* fundamental features: create/alter ddl, set/get (more below), works with
column predicates
* c++ client: DecimalValue struct, either set directly or created with
FromString, e.g. FromString("12345.67890") gives a DecimalValue with underlying
value 1234567890, precision = 10, scale = 5
* ! Java client: get/set is always to/from BigDecimal
* ! underlying storage is based on precision, to save space; e.g., decimal(9,
0) fits in a signed 32-bit integer, so it's stored physically as 32-bit
integers.
The !'s mean I'm not done with it yet, plus everything needs a lot more polish
and testing, but I thought I'd reach out now to see if there's any other
desiderata. As I see it, the most important thing is to be compatible with
Impala's Decimal type, since I figure most users will use Kudu Decimal
indirectly by using Impala Decimal.
> Support for DECIMAL type
> ------------------------
>
> Key: KUDU-721
> URL: https://issues.apache.org/jira/browse/KUDU-721
> Project: Kudu
> Issue Type: New Feature
> Components: client, tablet
> Affects Versions: Private Beta
> Reporter: Todd Lipcon
> Priority: Critical
> Labels: kudu-roadmap
>
> [~mgrund] identified that without DECIMAL type, we're going to have issues
> with a lot of the tests tables that Impala uses. Also, since we're targeting
> some financial applications, it seems pretty crucial. This JIRA is to track
> the work necessary to support it. I'll write up some short design doc and
> post here.
> *Design doc*:
> https://docs.google.com/a/cloudera.com/document/d/1wIebU0HxviRLHFF1fSS-E30KPWOrTI0xVYAMPE6kliU/edit?usp=sharing
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)