zanmato1984 commented on code in PR #47377:
URL: https://github.com/apache/arrow/pull/47377#discussion_r2626365588
##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -367,6 +369,12 @@ Status ExecSpanIterator::Init(const ExecBatch& batch,
int64_t max_chunksize,
value_offsets_.clear();
value_offsets_.resize(args_->size(), 0);
max_chunksize_ = std::min(length_, max_chunksize);
+ selection_vector_ = batch.selection_vector.get();
+ if (selection_vector_) {
+ selection_length_ = selection_vector_->length();
+ } else {
+ selection_length_ = 0;
Review Comment:
Hmm, I may see it otherwise.
The naming of the three `selection_*_` members implies they are tightly
coupled (with `selection_vector_` being the "leader"). If `selection_vector_`
is null, then the value of `selection_length_` makes no sense, then `0` is more
close to the meaning of "nonsense" (less than `-1` though) I guess?
--
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]