[
https://issues.apache.org/jira/browse/IGNITE-13668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrey Mashenkov updated IGNITE-13668:
--------------------------------------
Description:
Let's extend native support for Numeric types.
* Number( n ) is an {{n}}-bytes two-complement integer signed value encoded in
the varlong style represented as {{BigInteger}}.
* Decimal is a direct mapping to BigDecimal value.
Each number must have a single binary representation.
In general, Decimal allows different equal representations for the same number
"10" and "10.0".
So, to fix this Decimals must be converted to the column scale before being
saved.
Actually, serialization with preserving is not necessary because indices may
have their own format for inline values.
was:
Let's extend native support for Numeric types.
* Number( n ) is an {{n}}-bytes two-complement integer signed value encoded in
the varlong style
(so that Number(4) can be mapped to integer and Number(8) can be mapped to long
during (de)serialization).
* Larger numbers can be represented as {{BigInteger}}.
* The Number( n ) is a varlen type, so it will take two additional bytes in the
varlen table, so types smaller than Number(4) are better represented by
{{byte}} and {{short}} and {{int}} types as their fixlen encoding takes exactly
1, 2, 4 bytes respectively.
* Decimal is a direct mapping to BigDecimal value.
> Type system. Number(n) and Decimal native types.
> ------------------------------------------------
>
> Key: IGNITE-13668
> URL: https://issues.apache.org/jira/browse/IGNITE-13668
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexey Goncharuk
> Assignee: Vladimir Ermakov
> Priority: Major
> Labels: iep-54, ignite-3
> Fix For: 3.0.0-alpha3
>
> Original Estimate: 168h
> Time Spent: 7.5h
> Remaining Estimate: 160.5h
>
> Let's extend native support for Numeric types.
> * Number( n ) is an {{n}}-bytes two-complement integer signed value encoded
> in the varlong style represented as {{BigInteger}}.
> * Decimal is a direct mapping to BigDecimal value.
> Each number must have a single binary representation.
> In general, Decimal allows different equal representations for the same
> number "10" and "10.0".
> So, to fix this Decimals must be converted to the column scale before being
> saved.
> Actually, serialization with preserving is not necessary because indices may
> have their own format for inline values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)