Expand description
Building a table’s graph sections from the table’s own columns.
This is where the two halves meet. rudb-graph at rank 5 knows what a key map is and knows
nothing about a file; the rest of this crate knows how to put an opaque payload in a file and
nothing about what one means. Neither of them can build a key map for a real table, because
doing that means reading a column back, so it happens here, in the crate that is allowed to see
both.
Everything here obeys spec/graph/03-the-file-format.md section 3.1. A column that cannot be
mapped is a column with no key map, not an error at open; a section that is stale, torn, or of a
form this build does not know is a section that is not there. That is why key_map answers
with an Option and not a Result: there is no failure it could report that is not
answered by running the query the way it ran before the section existed.
Structs§
- Built
- What building one key map cost and what it bought.
- KeyColumn
- One column of a committed table, scanned in
ridorder.
Constants§
- BUDGET_
FLOOR - The size below which a table’s graph sections always fit, whatever the share works out to.
- BUDGET_
SHARE - The share of a table’s stored column bytes its graph sections are allowed to cost together.
Functions§
- build_
key_ map - Builds the key map for one column of a committed table.
- build_
key_ maps - Builds a key map for each of these columns and attaches them all in one commit.
- build_
key_ maps_ within - The same, against a budget of
sharepercent of the table’s stored column bytes. - key_map
- The key map this table carries for a column, when it carries one this build can use.