kamcheungting-db commented on code in PR #1065:
URL: https://github.com/apache/iceberg-cpp/pull/1065#discussion_r4510454683
##########
src/iceberg/data/file_scan_task_reader.cc:
##########
@@ -131,9 +185,43 @@ class MergeOnReadStreamSource {
}
private:
+ // Returns the candidate rows that match the residual filter: either the
+ // previously selected rows, or every row when no filter has removed a row
yet.
+ Result<std::vector<int32_t>> KeepResidualMatches(const ArrowSchema&
input_arrow_schema,
+ const ArrowArray&
input_batch,
+ const std::vector<int32_t>&
selection,
+ bool all_rows_selected) {
+ ICEBERG_PRECHECK(std::in_range<int32_t>(input_batch.length),
+ "Batch length {} exceeds int32_t row index capacity",
+ input_batch.length);
+ ICEBERG_ASSIGN_OR_RAISE(auto row,
+ ArrowArrayStructLike::Make(input_arrow_schema,
input_batch));
+ std::vector<int32_t> kept;
+ auto keep = [&](int64_t index) -> Status {
+ ICEBERG_RETURN_UNEXPECTED(row->Reset(index));
+ ICEBERG_ASSIGN_OR_RAISE(bool matches,
residual_evaluator_->Evaluate(*row));
Review Comment:
Done.
The NULL checks on bound references now inspect scalar validity without
converting the value to a literal. Added regression coverage for struct, list,
and map columns.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]