Skip to content

Commit 893fc06

Browse files
committed
Tweak comment
1 parent ef1f173 commit 893fc06

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎datafusion/functions-aggregate/src/approx_distinct.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ impl Accumulator for StringViewHLLAccumulator {
240240
// constructing a &str to call self.hll.add()
241241
let bv = ByteView::from(view);
242242
let offset = bv.offset as usize;
243-
// SAFETY: view came from the array so buffer_index
244-
// and offset..offset+len are in bounds.
243+
// SAFETY: StringViewArray guarantees that each view's
244+
// buffer_index is a valid index into data_buffers(), and
245+
// offset..offset+len falls within that buffer.
245246
let bytes = unsafe {
246247
buffers
247248
.get_unchecked(bv.buffer_index as usize)

0 commit comments

Comments
 (0)