Copilot commented on code in PR #50926:
URL: https://github.com/apache/arrow/pull/50926#discussion_r3862740125
##########
cpp/src/arrow/csv/parser.h:
##########
@@ -80,7 +82,16 @@ class ARROW_EXPORT DataBatch {
auto start = values[pos].offset;
auto stop = values[pos + 1].offset;
auto quoted = values[pos + 1].quoted;
- Status status = visit(parsed_ + start, stop - start, quoted);
+ const bool row_has_missing_fields =
+ missing_index < missing_fields_.size() &&
+ missing_fields_[missing_index].row == batch_row;
+ const bool missing =
+ row_has_missing_fields &&
+ col_index >= missing_fields_[missing_index].first_missing_column;
+ if (row_has_missing_fields) {
+ ++missing_index;
+ }
+ Status status = visit(parsed_ + start, stop - start, quoted, missing);
Review Comment:
`DataBatch::VisitColumn()` now unconditionally calls visitors with the
4-argument signature `(data, size, quoted, missing)`. Since `BlockParser` /
`DataBatch` are exported headers, this is a source-breaking change for any
downstream code using the previous 3-argument visitor signature. Consider
preserving backward compatibility by accepting both visitor forms (e.g. using
SFINAE / `std::is_invocable_r_v` to call the appropriate overload, defaulting
`missing=false` for legacy visitors).
--
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]