Skip to content

Commit be0576a

Browse files
committed
review: better doc
1 parent 32bde44 commit be0576a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

datafusion/functions/src/string/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ fn case_conversion_utf8view_ascii_inner<F: Fn(&u8) -> u8>(
522522
let to_reserve = len.max(block_size as usize);
523523
#[expect(
524524
clippy::disallowed_methods,
525-
reason = "StringView block_size bounds growth, so reserve cannot overflow capacity"
525+
reason = "StringView's block size bounds growth, so reserve cannot overflow capacity arithmetically. This hot loop intentionally avoids the extra `try_reserve` checks. It remains subject to allocator failure/OOM, which must be managed externally."
526526
)]
527527
in_progress.reserve(to_reserve);
528528
}

datafusion/functions/src/strings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ impl StringViewArrayBuilder {
705705
let to_reserve = (length as usize).max(self.next_block_size() as usize);
706706
#[expect(
707707
clippy::disallowed_methods,
708-
reason = "StringView block_size bounds growth, so reserve cannot overflow capacity"
708+
reason = "StringView's block size bounds growth, so reserve cannot overflow capacity arithmetically. This hot loop intentionally avoids the extra `try_reserve` checks. It remains subject to allocator failure/OOM, which must be managed externally."
709709
)]
710710
self.in_progress.reserve(to_reserve);
711711
}
@@ -736,7 +736,7 @@ impl StringViewArrayBuilder {
736736
let to_reserve = (length as usize).max(self.next_block_size() as usize);
737737
#[expect(
738738
clippy::disallowed_methods,
739-
reason = "StringView block_size bounds growth, so reserve cannot overflow capacity"
739+
reason = "StringView's block size bounds growth, so reserve cannot overflow capacity arithmetically. This hot loop intentionally avoids the extra `try_reserve` checks. It remains subject to allocator failure/OOM, which must be managed externally."
740740
)]
741741
self.in_progress.reserve(to_reserve);
742742
}

0 commit comments

Comments
 (0)