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.