MCPcopy Create free account
hub / github.com/apache/paimon-rust / update

Method update

crates/paimon/src/table/sort_merge.rs:426–438  ·  view source on GitHub ↗

Update the tree after the winner has been consumed/advanced.

(&mut self, is_gt: impl Fn(usize, usize) -> bool)

Source from the content-addressed store, hash-verified

424
425 /// Update the tree after the winner has been consumed/advanced.
426 fn update(&mut self, is_gt: impl Fn(usize, usize) -> bool) {
427 let mut winner = self.nodes[0];
428 let mut cmp_node = self.leaf_index(winner);
429 while cmp_node != 0 {
430 let challenger = self.nodes[cmp_node];
431 if is_gt(winner, challenger) {
432 self.nodes[cmp_node] = winner;
433 winner = challenger;
434 }
435 cmp_node = Self::parent_index(cmp_node);
436 }
437 self.nodes[0] = winner;
438 }
439}
440
441// ---------------------------------------------------------------------------

Callers 9

build_blob_file_bytesFunction · 0.80
writeMethod · 0.80
write_null_bitmapMethod · 0.80
verify_null_bitmap_crcFunction · 0.80
compute_crc32Function · 0.80
md5_base64Method · 0.80
hmac_sha256Method · 0.80
sha256_hexMethod · 0.80
hmac_sha1_base64Method · 0.80

Calls 1

leaf_indexMethod · 0.80

Tested by 1

build_blob_file_bytesFunction · 0.64