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

Method write_timestamp_non_compact

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

Write a non-compact Timestamp (precision > 3).

(
        &mut self,
        pos: usize,
        epoch_millis: i64,
        nano_of_milli: i32,
    )

Source from the content-addressed store, hash-verified

538
539 /// Write a non-compact Timestamp (precision > 3).
540 pub fn write_timestamp_non_compact(
541 &mut self,
542 pos: usize,
543 epoch_millis: i64,
544 nano_of_milli: i32,
545 ) {
546 let var_offset = self.data.len();
547 self.data.extend_from_slice(&epoch_millis.to_le_bytes());
548 let encoded = ((var_offset as u64) << 32) | (nano_of_milli as u32 as u64);
549 let offset = self.field_offset(pos);
550 self.data[offset..offset + 8].copy_from_slice(&encoded.to_le_bytes());
551 }
552
553 pub fn build(self) -> BinaryRow {
554 BinaryRow::from_bytes(self.arity, self.data)

Callers 3

write_datumMethod · 0.80
write_typed_valueFunction · 0.80

Calls 2

lenMethod · 0.45
field_offsetMethod · 0.45

Tested by

no test coverage detected