zhouyc-ali commented on code in PR #471:
URL: https://github.com/apache/paimon-cpp/pull/471#discussion_r4397526037
##########
src/paimon/format/vortex/vortex_file_batch_reader.cpp:
##########
@@ -448,24 +408,42 @@ Result<std::unique_ptr<::ArrowSchema>>
VortexFileBatchReader::GetFileSchema() co
Status VortexFileBatchReader::SetReadSchema(
::ArrowSchema* read_schema, const std::shared_ptr<Predicate>& predicate,
const std::optional<RoaringBitmap32>& selection_bitmap) {
+ if (closed_) {
+ return Status::Invalid("Vortex reader is closed");
+ }
if (read_schema == nullptr) {
return Status::Invalid("Vortex read schema is nullptr");
}
- // TODO(zhouyc-ali): push the row selection into the Vortex scan
- (void)selection_bitmap;
- // No pushdown: the whole file is scanned and reading restarts from row 0,
so drop the
- // single-use scan; the next read re-creates it.
+ // Keep selected physical row ids to map output positions after selection
pushdown.
+ std::vector<uint64_t> selection_row_ids;
+ if (selection_bitmap) {
+
selection_row_ids.reserve(static_cast<size_t>(selection_bitmap->Cardinality()));
Review Comment:
Fixed. Dense selections now use exclusion indices to avoid expanding all
surviving rows. Physical row mapping is preserved. Added regression tests
covering the single-deletion case and selection edge cases.
##########
cmake_modules/vortex-fmm-cache-shards.diff:
##########
@@ -0,0 +1,114 @@
+diff --git a/vortex-layout/src/layouts/struct_/reader.rs
b/vortex-layout/src/layouts/struct_/reader.rs
Review Comment:
Added Apache 2.0 license headers to both patch files. The local RAT check
and patch application checks pass.
--
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]