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

Method write_bucket

crates/paimon/src/table/table_write.rs:496–508  ·  view source on GitHub ↗

Write a batch directly to the writer for the given (partition, bucket).

(
        &mut self,
        partition_bytes: Vec<u8>,
        bucket: i32,
        batch: RecordBatch,
    )

Source from the content-addressed store, hash-verified

494
495 /// Write a batch directly to the writer for the given (partition, bucket).
496 async fn write_bucket(
497 &mut self,
498 partition_bytes: Vec<u8>,
499 bucket: i32,
500 batch: RecordBatch,
501 ) -> Result<()> {
502 let key = (partition_bytes, bucket);
503 if !self.partition_writers.contains_key(&key) {
504 self.create_writer(key.0.clone(), key.1).await?;
505 }
506 let writer = self.partition_writers.get_mut(&key).unwrap();
507 writer.write(&batch).await
508 }
509
510 /// Write multiple Arrow RecordBatches.
511 pub async fn write_arrow(&mut self, batches: &[RecordBatch]) -> Result<()> {

Callers 1

write_arrow_batchMethod · 0.80

Calls 2

create_writerMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected