luoyuxia commented on code in PR #228:
URL: https://github.com/apache/fluss-rust/pull/228#discussion_r2748349564
##########
crates/fluss/src/client/table/append.rs:
##########
@@ -70,10 +86,25 @@ impl AppendWriter {
result_handle.result(result)
}
+ /// Appends an Arrow RecordBatch to the table.
+ ///
+ /// For partitioned tables, the partition is derived from the **first
row** of the batch.
+ /// Callers must ensure all rows in the batch belong to the same partition.
pub async fn append_arrow_batch(&self, batch: RecordBatch) -> Result<()> {
+ let physical_table_path = if self.partition_getter.is_some() &&
batch.num_rows() > 0 {
+ let first_row = ColumnarRow::new(Arc::new(batch.clone()));
Review Comment:
actually it's not expensive for cloning the batch. It's just swallow copy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]