Expand description
Helper functions for finding affected ranges from over window range cache for a given set of changes (delta).
Functionsยง
- 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.
- 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. - 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. - 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. - 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. - 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. - 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. - 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
). - 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 severalROWS
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.