Description
To move towards single-pass in-place construction of binary tuples the biggest obstacle is presence of the null map.
It is proposed to encode null values as a single-byte special value (null mark) in-line with regular values. It is required to escape regular values that have the same bit pattern as the null mark so the null mark needs to be relatively rare. The value of 0x80 seems a good one.
It is proposed to encode a null value as empty byte sequence. Zero-value compression has to be removed from the format. Empty strings and byte arrays has to be encoded as a single-byte special value (e.g. 0x80). The string and byte array values that start with with the same single byte has to be escaped by doubling this byte.
By the way, this would greatly simplify making tuples from other tuples. E.g. if we need to copy values for a column range [3, 7] from one tuple to another tuple, we could copy values almost blindly with single memory copy. No need for any bit magic anymore.
Attachments
Issue Links
- links to