HippoBaro commented on code in PR #9804:
URL: https://github.com/apache/arrow-rs/pull/9804#discussion_r3142795361


##########
parquet/src/arrow/push_decoder/remaining.rs:
##########
@@ -83,40 +238,47 @@ impl RemainingRowGroups {
     ) -> Result<DecodeResult<ParquetRecordBatchReader>, ParquetError> {
         loop {
             // Are we ready yet to start reading?
-            let result: DecodeResult<ParquetRecordBatchReader> =
-                self.row_group_reader_builder.try_build()?;
-            match result {
-                DecodeResult::Finished => {
+            match self.row_group_reader_builder.try_build()? {
+                RowGroupBuildResult::Idle => {
                     // reader is done, proceed to the next row group
                     // fall through to the next row group
                     // This happens if the row group was completely filtered 
out
                 }
-                DecodeResult::NeedsData(ranges) => {
+                RowGroupBuildResult::Finished { remaining_budget } => {
+                    self.frontier.advance_budget(remaining_budget);

Review Comment:
   Thanks! The frontier owns the cross-row-group budget until it hands a 
`NextRowGroup` to the builder and the builder owns that budget only while 
decoding the active row group, then returns `remaining_budget`.
   
   No more possibility of corrupted states



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