Skip to content

Commit

Permalink
chore: rename
Browse files Browse the repository at this point in the history
  • Loading branch information
discord9 committed Aug 23, 2024
1 parent faeb3cf commit 3aafc1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/flow/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ impl Batch {
}

/// append another batch to self
///
/// NOTE: This is expensive since it will create new vectors for each column
pub fn append_batch(&mut self, other: Batch) -> Result<(), EvalError> {
ensure!(
self.batch.len() == other.batch.len()
Expand Down Expand Up @@ -227,11 +229,11 @@ impl Batch {
.collect_vec();

let mut result = vec![];
let zelf_row_count = self.row_count();
let self_row_count = self.row_count();
let other_row_count = other.row_count();
for (idx, mut builder) in batch_builders.into_iter().enumerate() {
builder
.extend_slice_of(self.batch()[idx].as_ref(), 0, zelf_row_count)
.extend_slice_of(self.batch()[idx].as_ref(), 0, self_row_count)
.context(DataTypeSnafu {
msg: "Failed to extend vector",
})?;
Expand All @@ -243,7 +245,7 @@ impl Batch {
result.push(builder.to_vector());
}
self.batch = result;
self.row_count = zelf_row_count + other_row_count;
self.row_count = self_row_count + other_row_count;
Ok(())
}
}

0 comments on commit 3aafc1c

Please sign in to comment.