Versions Compared

Key

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

...

This approach is naturally extended to fixed-size fields. But instead of a zero-length value we interpret it as a value of zero. That is More specifically:

  • 0 for all integer types;
  • 0.0 for floating point types;
  • 00000000-0000-0000-0000-000000000000 for UUID;
  • 00:00:00.000000 for time;
  • Jan 1, 1970 00:00:00.000000 for timestamp;
  • Jan 1, 1 BC for date (as 1 BC immediately precedes 1 AD in the Gregorian calendar).

...

  • are there any null values, if no then we can skip the nullmap;
  • what is the total length of all non-null values, after that we can figure out the minimum possible size of the offset table entries.

Thus, generally speaking, building a binary tuple is a two-pass procedure. Sometimes it might be possible to turn this into a single pass (almost) by over-provisioning the allocated storage for the worst case and then fixing it up at the end.

...