Skip to content

ParquetMetaDataPushDecoder API to clear all buffered ranges#9673

Open
nathanb9 wants to merge 3 commits intoapache:mainfrom
nathanb9:parquet-metadata-push-decoder-api-to-clear-all-buffered-ranges
Open

ParquetMetaDataPushDecoder API to clear all buffered ranges#9673
nathanb9 wants to merge 3 commits intoapache:mainfrom
nathanb9:parquet-metadata-push-decoder-api-to-clear-all-buffered-ranges

Conversation

@nathanb9
Copy link
Copy Markdown
Contributor

@nathanb9 nathanb9 commented Apr 7, 2026

This PR is a follow up for this ticket . Implement same API but for the metadata decoder.

Rationale for this change

ParquetMetaDataPushDecoder clears exact requested ranges, but larger
speculative pushed ranges can remain buffered in PushBuffers. This
adds a way for callers to explicitly release non exact ranges

What changes are included in this PR?

This adds clear_all_ranges(), which clears all byte ranges still
staged in the decoder's internal PushBuffers

Are these changes tested?

yes

Are there any user-facing changes?

Yes, this adds a new public clear_all_ranges() API on
ParquetMetaDataPushDecoder

@github-actions github-actions bot added the parquet Changes to the parquet crate label Apr 7, 2026
}

/// Clear all buffered ranges and their corresponding data
#[cfg(feature = "arrow")]
Copy link
Copy Markdown
Contributor Author

@nathanb9 nathanb9 Apr 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not useful i think.

Also, how does the CI work? Does it use the pr label to figure out which feature flags to use?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the feature gate is necessary without the changes in this PR 😉.

IIRC the CI will do builds with various sets of features enabled. The actual unit tests are then run with default features and all features.

@nathanb9 nathanb9 marked this pull request as ready for review April 8, 2026 00:50
Copy link
Copy Markdown
Contributor

@etseidl etseidl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission @nathanb9. Seems logical to me.

If it's not to much trouble could you also add an issue with a motivating use case? That aids in documentation for releases.

I also think it would be nice to add an example of the use of this API to the documentation at the head of push_decoder.rs.

}

/// Clear all buffered ranges and their corresponding data
#[cfg(feature = "arrow")]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the feature gate is necessary without the changes in this PR 😉.

IIRC the CI will do builds with various sets of features enabled. The actual unit tests are then run with default features and all features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants