[
https://issues.apache.org/jira/browse/IGNITE-13668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17315452#comment-17315452
]
Andrey Mashenkov edited comment on IGNITE-13668 at 4/6/21, 4:29 PM:
--------------------------------------------------------------------
1. Does it make sense to has real varlen Numerics for {{Number(n)}} where n<8 ?
With a suggested approach, we could save a single byte only in the case of
Numeric(5), other cases will cost more or equal memory if they are encoded as
fixlen (short, int, long).
2. Is it possible to serialize decimal into byte[] preserving the ordering to
avoid serialization/deserialization due to performance reasons.
This may be very useful for SQL indices.
was (Author: amashenkov):
1. Does it make sense to has real varlen Numerics for Number(n) where n<8 ?
With a suggested approach, we could save a single byte only in the case of
Numeric(5), other cases will cost more or equal memory if they are encoded as
fixlen (short, int, long).
2. Is it possible to serialize decimal into byte[] preserving the ordering to
avoid serialization/deserialization due to performance reasons.
This may be very useful for SQL indices.
> Implement 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
> Priority: Major
> Labels: iep-54, ignite-3
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)