Write a non-compact Timestamp (precision > 3).
(
&mut self,
pos: usize,
epoch_millis: i64,
nano_of_milli: i32,
)
| 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) |
no test coverage detected