Do not store table names and field names in FieldName.
Rather, store the table id and the column id which is substantially cheaper (8 bytes).
Fixes a bug in fn column_pos along the way and does some drive-by cleanup.
The second commit adds both necessary changes to tests and refactoring around them, and similar changes which I had to do to understand and be confident in the changes to the tests. The diff got larger than I wanted, but once merged, I think it will help us long term.
Description of Changes
Do not store table names and field names in
FieldName
. Rather, store the table id and the column id which is substantially cheaper (8 bytes). Fixes a bug infn column_pos
along the way and does some drive-by cleanup.The second commit adds both necessary changes to tests and refactoring around them, and similar changes which I had to do to understand and be confident in the changes to the tests. The diff got larger than I wanted, but once merged, I think it will help us long term.
Fixes https://github.com/clockworklabs/SpacetimeDB/issues/1118. Fixes https://github.com/clockworklabs/SpacetimeDB/issues/1117.
API and ABI breaking changes
None
Expected complexity level and risk
2