Skip to content

Commit 638c2c3

Browse files
authored
chore: Remove row_step from process_sorted_row_partition (apache#2920)
1 parent b51a65d commit 638c2c3

1 file changed

Lines changed: 13 additions & 23 deletions

File tree

  • native/core/src/execution/shuffle

native/core/src/execution/shuffle/row.rs

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -765,9 +765,6 @@ pub fn process_sorted_row_partition(
765765
initial_checksum: Option<u32>,
766766
codec: &CompressionCodec,
767767
) -> Result<(i64, Option<u32>), CometError> {
768-
// TODO: We can tune this parameter automatically based on row size and cache size.
769-
let row_step = 10;
770-
771768
// The current row number we are reading
772769
let mut current_row = 0;
773770
// Total number of bytes written
@@ -790,26 +787,19 @@ pub fn process_sorted_row_partition(
790787
})?;
791788

792789
// Appends rows to the array builders.
793-
let mut row_start: usize = current_row;
794-
while row_start < current_row + n {
795-
let row_end = std::cmp::min(row_start + row_step, current_row + n);
796-
797-
// For each column, iterating over rows and appending values to corresponding array
798-
// builder.
799-
for (idx, builder) in data_builders.iter_mut().enumerate() {
800-
append_columns(
801-
row_addresses_ptr,
802-
row_sizes_ptr,
803-
row_start,
804-
row_end,
805-
schema,
806-
idx,
807-
builder,
808-
prefer_dictionary_ratio,
809-
)?;
810-
}
811-
812-
row_start = row_end;
790+
// For each column, iterating over rows and appending values to corresponding array
791+
// builder.
792+
for (idx, builder) in data_builders.iter_mut().enumerate() {
793+
append_columns(
794+
row_addresses_ptr,
795+
row_sizes_ptr,
796+
current_row,
797+
current_row + n,
798+
schema,
799+
idx,
800+
builder,
801+
prefer_dictionary_ratio,
802+
)?;
813803
}
814804

815805
// Writes a record batch generated from the array builders to the output file.

0 commit comments

Comments
 (0)