Skip to content

Commit

Permalink
Further tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Sep 14, 2023
1 parent 8e3b884 commit fe93e7a
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions arrow-row/src/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,22 @@ fn decode_blocks(row: &[u8], options: SortOptions, mut f: impl FnMut(&[u8])) ->
let mut idx = 1;
for _ in 0..MINI_BLOCK_COUNT {
let sentinel = row[idx + MINI_BLOCK_SIZE];
if sentinel == continuation {
f(&row[idx..idx + MINI_BLOCK_SIZE]);
idx += MINI_BLOCK_SIZE + 1;
continue;
if sentinel != continuation {
f(&row[idx..idx + block_len(sentinel)]);
return idx + MINI_BLOCK_SIZE + 1;
}
f(&row[idx..idx + block_len(sentinel)]);
return idx + MINI_BLOCK_SIZE + 1;
f(&row[idx..idx + MINI_BLOCK_SIZE]);
idx += MINI_BLOCK_SIZE + 1;
}

loop {
let sentinel = row[idx + BLOCK_SIZE];
if sentinel == continuation {
f(&row[idx..idx + BLOCK_SIZE]);
idx += BLOCK_SIZE + 1;
continue;
if sentinel != continuation {
f(&row[idx..idx + block_len(sentinel)]);
return idx + BLOCK_SIZE + 1;
}
f(&row[idx..idx + block_len(sentinel)]);
return idx + BLOCK_SIZE + 1;
f(&row[idx..idx + BLOCK_SIZE]);
idx += BLOCK_SIZE + 1;
}
}

Expand Down

0 comments on commit fe93e7a

Please sign in to comment.