Expand description
Helper functions for finding affected ranges from over window range cache for a given set of changes (delta).
Functionsยง
- calc_
logical_ ๐boundary_ for_ range_ frames - Given the curr keys of the first and the last affected frames, calculate the order values of the logical start row of the first frame and the logical end row of the last frame.
- calc_
logical_ ๐curr_ for_ range_ frames - Given the first and last key in delta, calculate the order values of the first
and the last frames logically affected by some
RANGE
frames. - calc_
logical_ ๐ord_ for_ range_ frames - Given a pair of left and right state keys, calculate the leftmost (smallest) and rightmost
(largest) order values after the two given
offset_fn
s are applied, for all range frames. - find_
boundary_ ๐for_ rows_ frame - find_
curr_ ๐for_ rows_ frame - find_
first_ ๐curr_ for_ rows_ frame - For a canonical
ROWS
frame, given a key in delta, find the cache key corresponding to the CURRENT ROW of the first frame that contains the given key. - find_
for_ ๐range_ frames - find_
frame_ ๐end_ for_ rows_ frame - For a canonical
ROWS
frame, given a key inpart_with_delta
corresponding to some CURRENT ROW, find the cache key corresponding to the end row in that frame. - find_
frame_ ๐start_ for_ rows_ frame - For a canonical
ROWS
frame, given a key inpart_with_delta
corresponding to some CURRENT ROW, find the cache key corresponding to the start row in that frame. - find_
last_ ๐curr_ for_ rows_ frame - For a canonical
ROWS
frame, given a key in delta, find the cache key corresponding to the CURRENT ROW of the last frame that contains the given key. - find_
left_ ๐for_ range_ frames - Given a left logical order value (e.g. first curr order value, first delta order value),
find the most closed cache key in
part_with_delta
. Ideally this function returns the smallest key that is larger than or equal to the given logical order (usinglower_bound
). - find_
right_ ๐for_ range_ frames - Given a right logical order value (e.g. last curr order value, last delta order value),
find the most closed cache key in
part_with_delta
. Ideally this function returns the largest key that is smaller than or equal to the given logical order (usinglower_bound
). - merge_
rows_ ๐frames - Merge several
ROWS
frames into one super frame. The returned super frame is guaranteed to be canonical, which means that theCURRENT ROW
is always included in the returned frame.