Versions Compared

Key

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

...

tupleSize = valueBaseOffset + valueAreaSize;   // valueAreaSize goes from the last offset table entry

Corollary #2

In order to build a tuple using minimum possible space it is required to learn two things:

  • 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 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.

Reference Links

1. IEP-54: Schema-first Approach

...