tustvold commented on a change in pull request #1185: URL: https://github.com/apache/arrow-rs/pull/1185#discussion_r785357479
########## File path: parquet/src/arrow/levels.rs ########## @@ -780,17 +773,25 @@ impl LevelInfo { }) .collect(); } + let mut filtered = vec![]; - // remove slots that are false from definition_mask + let mut definition_levels = self.definition.iter(); let mut index = 0; - self.definition.iter().for_each(|def| { - if *def == self.max_definition { - filtered.push(index); - } - if *def >= self.max_definition - is_nullable as i16 { - index += 1; + + for len in self.array_offsets.windows(2).map(|s| s[1] - s[0]) { + if len == 0 { + // Skip this definition level (it should be less than max_definition) Review comment: Perhaps this code should verify that it is indeed a null? :thinking: -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org