...
Type | Size | Description |
---|---|---|
Bitmask(n) | ⌈n/8⌉ bytes | A fixed-length bitmask of n bits |
ByteInt8 | 1 byte | 1-byte signed integer |
Uint8 | 1 byte | 1-byte unsigned integer |
Int16Short | 2 bytes | 2-byte signed integer |
Uint16 | 2 bytes | 2-byte unsigned integer |
Int32Integer | 4 bytes | 4-byte signed integer |
Uint32 | 4 bytes | 4-byte unsigned integer |
LongInt64 | 8 bytes | 8-byte signed integer |
Uint64 | 8 bytes | 8-byte unsigned integer |
Float | 4 bytes | 4-byte floating-point number |
Double | 8 bytes | 8-byte floating-point number |
Number([n]) | Variable | Variable-length number (optionally bound by n bytes in size) |
Decimal | Variable | Variable-length floating point number |
UUID | 16 bytes | UUID |
String | Variable | String encoded with a given Charset |
Date | 3 bytes | A timezone-free date encoded as year (15 bits), month (4 bits), day (5 bits) |
Time | 4 bytes | A timezone-free time encoded as padding (5 bits), hour (5 bits), minute (6 bits), second (6 bits), millisecond (10 bits) |
Datetime | 7 bytes | A timezone-free datetime encoded as (date, time) |
Instant | 8 bytes | Number of milliseconds since Jan 1, 1970 00:00:00.000 (with no timezone) |
BLOB | Variable | Variable-size byte array |
...
Ignite will provide out-of-box mapping from standard platform types (Java, C#, C++) to built-in primitives. A user will be able to alter this mapping using some external mechanism (e.g. annotations to map long values to Number). Standard mapping is listed in the table below:
Built-in | Java | C# | C++ |
---|---|---|---|
Bitmask(n) | BitSet |
Int8 | byte (Byte if nullable) |
sbyte | |||
Uint8 | short with range constraints | byte | |
Int16 | short (Short if nullable) |
short | |||
Uint16 | int with range constratints | ushort | |
Int32 | int (Integer if nullable) |
int | |||
Uint32 | long with range constratints | uint | |
Int64 | long (Long if nullable) | long | |
Uint64 | BigInteger with range constratints | ulong | |
Float | float (Float if nullable) | float | |
Double | double (Double if nullable) | double | |
Number([n]) | BigInteger | BigInteger | |
Decimal | BigDecimal | decimal | |
UUID | UUID | Guid | |
String | String | string | |
Date | LocalDate | ||
Time | LocalTime | ||
Datetime | LocalDateTime | ||
Instant | Date (Instant?) | ||
BLOB | byte[] |
As Java has no native support for unsigned types. We still can introduce 'unsigned' flag to schema type and separate binary type-codes, and allow to map to the closest types of wider range. E.g. map Uint8 → short and recheck constraints during serialization.
If one will try to serialize object with 'short' value out of Uint8 range then it end up with exception (ColumnValueIsOutOfRangeException).
...