Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/src/arrow/compute/kernels/aggregate_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ enable_if_t<std::is_floating_point<SumType>::value, SumType> SumArray(

// reduce summation of one block (may be smaller than kBlockSize) from leaf node
// continue reducing to upper level if two summations are ready for non-leaf node
auto reduce = [&](SumType block_sum) {
auto reduce = [&, levels](SumType block_sum) {
Comment thread
pitrou marked this conversation as resolved.
int cur_level = 0;
uint64_t cur_level_mask = 1ULL;
sum[cur_level] += block_sum;
Expand Down
12 changes: 8 additions & 4 deletions cpp/src/arrow/compute/kernels/scalar_set_lookup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ struct SetLookupState : public KernelState {
auto visit_valid = [&](T v) {
const auto memo_size = static_cast<int32_t>(memo_index_to_value_index.size());
int32_t unused_memo_index;
auto on_found = [&](int32_t memo_index) { DCHECK_LT(memo_index, memo_size); };
auto on_not_found = [&](int32_t memo_index) {
auto on_found = [&, memo_size](int32_t memo_index) {
Comment thread
pitrou marked this conversation as resolved.
DCHECK_LT(memo_index, memo_size);
};
auto on_not_found = [&, memo_size](int32_t memo_index) {
DCHECK_EQ(memo_index, memo_size);
memo_index_to_value_index.push_back(index);
};
Expand All @@ -79,8 +81,10 @@ struct SetLookupState : public KernelState {
};
auto visit_null = [&]() {
const auto memo_size = static_cast<int32_t>(memo_index_to_value_index.size());
auto on_found = [&](int32_t memo_index) { DCHECK_LT(memo_index, memo_size); };
auto on_not_found = [&](int32_t memo_index) {
auto on_found = [&, memo_size](int32_t memo_index) {
DCHECK_LT(memo_index, memo_size);
};
auto on_not_found = [&, memo_size](int32_t memo_index) {
DCHECK_EQ(memo_index, memo_size);
memo_index_to_value_index.push_back(index);
};
Expand Down