def block_pick
mylsm-lsm-store@0.6.0.1 · src/Sstable.bend:484
import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable
import Base
import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys
import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable
484
485def block_pick(
486 +chunks: List<&2, List<&2, MemTable.Entry>>,
487 +blocks: List<&2, String>,
488 +key: String
489) -> List<&2, MemTable.Entry>:
490 match chunks blocks:
491 case Nil{} _:
492 Nil{}
493 case _ Nil{}:
494 Nil{}
495 case Con{c, ct} Con{b, bt}:
496 chunk_at(chunks, pick_ix(bt, ct, 0n, key, Keys.cmp(b, key)))