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

Method add_matched_batch

crates/paimon/src/table/data_evolution_writer.rs:127–138  ·  view source on GitHub ↗

Add a batch of matched rows. The batch must contain: - A non-null `_ROW_ID` column (Int64) identifying which rows to update - One column for each entry in `update_columns` with the new values

(&mut self, batch: RecordBatch)

Source from the content-addressed store, hash-verified

125 /// - A non-null `_ROW_ID` column (Int64) identifying which rows to update
126 /// - One column for each entry in `update_columns` with the new values
127 pub fn add_matched_batch(&mut self, batch: RecordBatch) -> Result<()> {
128 if batch.num_rows() == 0 {
129 return Ok(());
130 }
131
132 let row_id_col = row_id_column(&batch)?;
133 validate_row_id_not_null(row_id_col)?;
134 validate_update_columns(&batch, &self.update_columns)?;
135
136 self.matched_batches.push(batch);
137 Ok(())
138 }
139
140 /// Scan file metadata, group matched rows by file, read originals,
141 /// apply updates, and write partial-column files.

Calls 4

row_id_columnFunction · 0.85
validate_row_id_not_nullFunction · 0.85
validate_update_columnsFunction · 0.85
num_rowsMethod · 0.80