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

Method write_binary_inline

crates/paimon/src/spec/binary_row.rs:492–502  ·  view source on GitHub ↗

Write short binary data (len <= 7) inline into the fixed part.

(&mut self, pos: usize, value: &[u8])

Source from the content-addressed store, hash-verified

490
491 /// Write short binary data (len <= 7) inline into the fixed part.
492 pub fn write_binary_inline(&mut self, pos: usize, value: &[u8]) {
493 assert!(
494 value.len() <= 7,
495 "inline binary must be <= 7 bytes, got {}",
496 value.len()
497 );
498 let offset = self.field_offset(pos);
499 self.data[offset..offset + 8].fill(0);
500 self.data[offset..offset + value.len()].copy_from_slice(value);
501 self.data[offset + 7] = 0x80 | (value.len() as u8);
502 }
503
504 /// Write a compact Decimal (precision <= 18) as its unscaled i64 value.
505 pub fn write_decimal_compact(&mut self, pos: usize, unscaled: i64) {

Callers 4

write_string_inlineMethod · 0.80
write_datumMethod · 0.80
write_typed_valueFunction · 0.80
test_get_binary_inlineFunction · 0.80

Calls 2

field_offsetMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected