tustvold commented on code in PR #2111:
URL: https://github.com/apache/arrow-rs/pull/2111#discussion_r928123393


##########
parquet/src/arrow/record_reader/definition_levels.rs:
##########
@@ -226,10 +226,27 @@ impl ColumnLevelDecoder for DefinitionLevelBufferDecoder {
 impl DefinitionLevelDecoder for DefinitionLevelBufferDecoder {
     fn skip_def_levels(
         &mut self,
-        _num_levels: usize,
-        _max_def_level: i16,
+        num_levels: usize,
+        max_def_level: i16,
     ) -> Result<(usize, usize)> {
-        Err(nyi_err!("https://github.com/apache/arrow-rs/issues/1792";))
+        // For now only support max_def_level == 1
+        if max_def_level == 1 {

Review Comment:
   Not quite, we only preserve the bitmask if this is a nullable leaf. 
   
   I.e we would preserve the bitmask for this 
   
   ```
   message Schema {
       OPTIONAL int32 field;
   }
   ```
   
   But not
   
   ```
   message Schema {
       OPTIONAL GROUP group {
           REQUIRED int32 field;
       }
   }
   ```
   
   Despite field having a max_def_level == 1 in both cases.
   
   Following #2117 I would remove all `max_def_level` logic, and just match the 
type of decoder. 



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