Skip to content

Commit a717eb4

Browse files
committed
docs: shorten the last_set_bit doc comment
1 parent ee5b4e3 commit a717eb4

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎datafusion/functions-window/src/nth_value.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,8 @@ impl NthValueEvaluator {
558558
/// Returns the index of the last set bit in `bits`, or `None` if no bit is set.
559559
///
560560
/// The bits are read a 64-bit word at a time from the end, so the cost grows with the distance
561-
/// from the end to the last set bit rather than with the length of `bits`. `LAST_VALUE ...
562-
/// IGNORE NULLS` looks up the last valid row of every frame, and a frame that starts at the
563-
/// partition's first row grows with every row, so enumerating the frame's valid rows from its
564-
/// start makes the partition quadratic.
561+
/// from the end to the last set bit rather than with the length of `bits`. Enumerating the set
562+
/// bits from the start instead is quadratic for a frame that grows with every row.
565563
fn last_set_bit(bits: &BooleanBuffer) -> Option<usize> {
566564
let chunk = UnalignedBitChunk::new(bits.values(), bits.offset(), bits.len());
567565
// The words hold `lead_padding` unset bits before `bits` and `trailing_padding` after it.

0 commit comments

Comments
 (0)