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.