Skip to content

Commit

Permalink
impl basic append_batch
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Oct 19, 2024
1 parent a83c2ea commit 3df75ac
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 106 deletions.
16 changes: 6 additions & 10 deletions datafusion/physical-plan/src/aggregates/group_values/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,13 @@ impl GroupValues for GroupValuesColumn {

// 1.4 Vectorized append values
for col_idx in 0..cols.len() {
let col_nullable = self.column_nullables_buffer[col_idx];
let all_non_null = !self.column_nullables_buffer[col_idx];
let group_value = &mut self.group_values[col_idx];
if col_nullable {
for &row in self.append_rows_buffer.iter() {
group_value.append_val(&cols[col_idx], row);
}
} else {
for &row in self.append_rows_buffer.iter() {
group_value.append_non_nullable_val(&cols[col_idx], row);
}
}
group_value.append_batch(
&cols[col_idx],
&self.append_rows_buffer,
all_non_null,
);
}

Ok(())
Expand Down
Loading

0 comments on commit 3df75ac

Please sign in to comment.