Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The suggested list of supported built-in data types is listed in the table below:

TypeSizeDescription
Bitmask(n)n/8 bytesA fixed-length bitmask of n bits
Byte1 byte1-byte signed integer
Short2 bytes2-byte signed integer
Integer4 bytes4-byte signed integer
Long8 bytes8-byte signed integer
Float4 bytes4-byte floating-point number
Double8 bytes8-byte floating-point number
Number([n])VariableVariable-length number (optionally bound by n bytes in size)
DecimalVariableVariable-length floating point number
UUID16 bytesUUID
StringVariableString encoded with a given Charset
Date3 bytesA timezone-free date encoded as day/month (1 byte), year (2 bytes)
Time5 bytesA timezone-free time encoded as hour (1 byte), minute (1 byte), second (1 byte), millisecond (2 bytes)
Datetime8 bytesA timezone-free datetime encoded as (date, time)
Instant8 bytesNumber of milliseconds since Jan 1, 1970 00:00:00.000 (with no timezone)
BLOBVariableVariable-size byte array
Data Layout

Given a set of user-defined columns, this set is then rearranged so that fixed-sized columns go first. This sorted set of columns is used to form a tuple. Tuple layout is as follows:

FieldSize
Schema version1 byte
Key columns hash4 bytes
Key columns:
Key columns full size2 (3?) bytes
Key columns varsize columns offsets table size2 bytes
Key columns varsize columns offsets tableVariable (number of non-null
varsize
non-default varsize columns * 2(3?))
Key columns null-defaults mapnumber of columns / 8
Key columns fixed size valuesVariable
Key columns variable size valuesVariable
Value columns:
Value columns full size2 (3?) bytes
Value columns varsize columns offsets table size2 bytes
Value columns varsize columns offsets tableVariable (number of non-null
varsize
non-default varsize columns * 2(3?))
Value columns null-defaults mapnumber of columns / 8
Value columns fixed size valuesVariable
Value columns variable size valuesVariable
Schema evolution

Unlike Ignite 2.x approach, where binary object schema ID is defined by a set of fields which are present in a binary object, for the schema-first approach we assign a monotonically growing identifier to each version of the cache schema. The ordering guarantees should be provided by the underlying metadata storage layer (for example, the current distributed metastorage implementation or consensus-based metadata storage). The schema identifier should be stored together with the data tuples (but not necessarily with each tuple individually: we can store schema ID along with a page or larger chunks of data). The history of schema versions must be stored for a long enough period of time to allow upgrade all existing data stored in a given cache.

...

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-inJavaC#C++
Bitmask(n)BitSet

Bytebyte (Byte if nullable)

Shortshort (Short if nullable)

Integerint (Integer if nullable)

Longlong (Long if nullable)

Floatfloat (Float if nullable)

Doubledouble (Double if nullable)

Number([n])BigInteger

DecimalBigDecimal

UUIDUUID

StringString

DateLocalDate

TimeLocalTime

DatetimeLocalDateTime

InstantDate (Instant?)

BLOBbyte[]

Dynamic schema expansion (flexible schemas)

...