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

Method close

crates/paimon/src/arrow/format/blob.rs:728–743  ·  view source on GitHub ↗
(mut self: Box<Self>)

Source from the content-addressed store, hash-verified

726 }
727
728 async fn close(mut self: Box<Self>) -> crate::Result<u64> {
729 let index_bytes = encode_delta_varints_write(&self.lengths);
730 let index_length = index_bytes.len() as i32;
731
732 self.writer.write(Bytes::from(index_bytes)).await?;
733 self.writer
734 .write(Bytes::copy_from_slice(&index_length.to_le_bytes()))
735 .await?;
736 self.writer
737 .write(Bytes::from_static(&[BLOB_FORMAT_VERSION]))
738 .await?;
739
740 let total = self.bytes_written + index_length as u64 + BLOB_FOOTER_SIZE;
741 self.writer.close().await?;
742 Ok(total)
743 }
744}
745
746fn encode_delta_varints_write(values: &[i64]) -> Vec<u8> {

Callers

nothing calls this directly

Calls 3

lenMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected