kevmo314/appendable

Further improve value storage

Closed this issue · 1 comments

Each b+ tree corresponds to a single type, so in the case of fixed width types (basically everything except a string), we don't actually need to store the value's length and instead can figure it out from the type of the field. Note, we still need the data pointer as a disambiguator.

In essence, we should pass some information into the b+ tree node that indicates that it's either fixed width or variable width, and if it's fixed width, how wide it should be. Widths are:

  • 1 byte for boolean
  • 8 bytes for int64 and float64
  • 0 bytes for null

Thinking about this more, we can probably store the width in the meta page and allocate two bytes for the width, 0xffff if it's variable width (current behavior).