etseidl commented on code in PR #11997:
URL: https://github.com/apache/arrow-rs/pull/11997#discussion_r4534311864


##########
parquet/src/arrow/arrow_writer/byte_array.rs:
##########
@@ -1031,14 +1032,16 @@ fn count_within_budget_offsets<T: ByteArrayType>(
     // Each plain-encoded value carries a 4-byte length prefix on the page.
     let prefix_overhead = std::mem::size_of::<u32>();
 
-    // Stage 1: O(1) span upper bound. The span `offsets[last+1] -
-    // offsets[first]` covers every array position in `[first, last]`, a
-    // superset of `indices` — and the skipped positions in a nullable
-    // column are nulls with zero offset delta, so the span still equals the
-    // exact payload. If it fits the budget, every value fits. Covers the
-    // common small-value case for both non-null and (sparse) nullable
-    // columns.
-    if last >= first {
+    // Stage 1: span upper bound. The span `offsets[last+1] - offsets[first]`

Review Comment:
   So the O(1) description is dropped here, but not at the calling site in 
`count_values_within_byte_budget_gather`, nor in the PR description.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to