...
A tuple field is a sequence of bytes. This sequence is interpreted according to the associated data type provided by the tuple schema. There are different encoding rules for different values. The For some data types the rules include a very simple compression mechanism. So even if the original type has some fixed size when it is it may take different number of bytes when encoded as a tuple field it may occupy variable number of bytes.
If a value is equal to NULL then it is absent in the value area. This means that in the offset table the corresponding entry is equal to the previous entry. At the same time the corresponding bit in the nullmap is set.
For any variable-length type we can encounter a value with zero length. Again the length is determined by the offset table. Quite naturally a zero-length variable-length value translates to a zero-length field in a tuple. This approach is extended to fixed-size types by introducing a notion of default values. We define specific default values for different types (specified in the table below). If a given value is equal to the corresponding default value then this translates to a zero-length field in a tuple.
...
The list of supported data types is as follows:
Type | Field Size | Default Value | Description |
---|---|---|---|
Int8 | 1 | 0 | |
Int16 | 1-, 2 | 0 | |
Int32 | 1-, 2, 4 | 0 | |
Int64 | 1-, 2, 4, 8 | 0 | |
Float | 4 | 0.0 | |
Double | 4, 8 | 0.0 | |
Number | variable | 0 | |
Decimal | variable | 0 | |
UUID | 16 | 00000000-0000-0000-0000-000000000000 | |
String | variable | empty string | |
Binary | variable | empty binary | |
Bitmask | variable | empty bit-string | |
Date | 3 | Jan 1, 1 BC for date (1 BC immediately precedes 1 AD in the Gregorian calendar) | |
Time | 4-, 5, 6 | 00:00:00.000000 | |
DateTime | 7-, 8, 9 | Jan 1, 1 BC, 00:00:00.000000 | |
Timestamp | 8, 12 | Jan 1, 1970 00:00:00.000000 | |
Duration | 8, 12 | 0 (PT0S) | |
Period | 3, 6, 12 | 0 (P0D) | |
Boolean | 1 | false |
...