haohuaijin commented on PR #10141: URL: https://github.com/apache/arrow-rs/pull/10141#issuecomment-4748859669
Thanks @alamb for the pointers. I looked at #6624, #7454, and the work that landed in #8733. My understanding is: - #6624 also used a boolean mask for row selection, but it added a separate `BooleanRowSelection` type instead of making `RowSelection` able to keep a `BooleanBuffer`. - #7454 tried a broader reader design: it used bitmap/range selections during predicate pushdown, coordinated predicate and projection decoding, and added a small page cache. - #8733 added the production path for choosing selector vs mask execution through `RowSelectionPolicy` and `RowSelectionCursor`. - **This PR is smaller**: it lets `RowSelection` keep a caller-provided `BooleanBuffer` and pass it directly to the mask cursor. This does not replace selector-backed selections. Selectors are still better for clustered/page-index-style selections. The case this helps is when the caller already has a row-level bitmap, such as from an external index, FTS index, or bitmap index. Today that bitmap has to go through `BooleanBuffer -> Vec<RowSelector> -> mask` in some paths. Keeping the original `BooleanBuffer` avoids that extra conversion and avoids building a large selector list for fragmented masks. So I see this as a small representation-layer improvement that complements #8733. #8733 added mask execution; this PR adds a direct bitmap-backed input path for it. It does not try to implement the broader adaptive predicate-pushdown/page-cache design from #7454. cc @hhhizzz @XiangpengHao @zhuqi-lucas -- 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]
