haohuaijin opened a new pull request, #11337: URL: https://github.com/apache/arrow-rs/pull/11337
# Which issue does this PR close? Follow-up to the suggestion in https://github.com/apache/datafusion/pull/25731#discussion_r4158690507. # Rationale for this change Engines composing row selections need to convert selector-backed selections to masks to keep an intersection or union bitmap-backed. Parquet already implements this conversion internally, but its public API requires callers such as DataFusion to rebuild the bitmap themselves. # What changes are included in this PR? Add `RowSelection::force_mask(self) -> Self`, reusing the existing bitmap conversion and preserving the full row span, including trailing skips. Selections that are already mask-backed are returned unchanged. The internal mask materialization policy now calls this method. # Are these changes tested? Unit tests cover empty, fully selected, fully skipped, and mixed selector sequences; reuse of an existing mask with a non-byte-aligned offset; repeated conversion; and preserving bitmap backing and selected rows through intersection. A runnable documentation example demonstrates the public API. # Are there any significant user-facing changes? No breaking changes. -- 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]
