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


##########
parquet/src/arrow/arrow_writer/levels.rs:
##########
@@ -311,6 +311,17 @@ impl LevelInfoBuilder {
         nulls: Option<&NullBuffer>,
         range: Range<usize>,
     ) {
+        // Fast path: entire list array is null; emit bulk null rep/def levels
+        if let Some(nulls) = nulls {
+            if nulls.null_count() == nulls.len() {

Review Comment:
   Pedantic nit: this pattern could be
   ```rust
   if nulls.is_some_and(|nulls| nulls.null_count() == nulls.len()) {
   ```
   I'm sure the compiler figures it out, but saves a few lines 😅 



-- 
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