Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re_datastore: improve terminology for internal types and concepts #639

Closed
teh-cmc opened this issue Dec 23, 2022 · 0 comments · Fixed by #1727
Closed

re_datastore: improve terminology for internal types and concepts #639

teh-cmc opened this issue Dec 23, 2022 · 0 comments · Fixed by #1727
Labels
⛃ re_datastore affects the datastore itself

Comments

@teh-cmc
Copy link
Member

teh-cmc commented Dec 23, 2022

The implementation of range queries (#609) has put a lot of stress on the terminology used within the store.
While it already wasn't that great before, it just completely broke down; making it really really hard to understand what's going on in some cases.

Here are some notes I took to make things better / more understandable:

// TODO(cmc): We desperately need to work on the terminology here:
//
// - `TimeIndex` is a vector of `TimeInt`s.
//   It's the primary column and it's always dense.
//   It's used to search the datastore by time.
//
// - `ComponentIndex` (currently `SecondaryIndex`) is a vector of `ComponentRowNr`s.
//   It's the secondary column and is sparse.
//   It's used to refine the primary time-based search for a specific component.
//
// - `ComponentRowNr` (currently `RowIndex`) is a row offset into a component table.
//   It only makes sense when associated with a component name.
//   It is absolute.
//   It's used to fetch actual data from the datastore.
//
// - `IndexRowNr` is a row offset into an index bucket.
//   It only makes sense when associated with an entity path and a specific time.
//   It is relative per bucket.
//   It's used to tiebreak results with an identical time, should you need too.
@teh-cmc teh-cmc added the ⛃ re_datastore affects the datastore itself label Dec 23, 2022
@teh-cmc teh-cmc self-assigned this Dec 23, 2022
@teh-cmc teh-cmc linked a pull request Dec 27, 2022 that will close this issue
@teh-cmc teh-cmc removed their assignment Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛃ re_datastore affects the datastore itself
Projects
None yet
1 participant