Skip to content

Commit

Permalink
Extend join fuzzer to cover group execution mode
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxmeng committed Mar 12, 2024
1 parent 829132a commit d7789eb
Show file tree
Hide file tree
Showing 5 changed files with 503 additions and 256 deletions.
11 changes: 5 additions & 6 deletions velox/exec/HashBuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,18 +500,17 @@ void HashBuild::spillInput(const RowVectorPtr& input) {
computeSpillPartitions(input);

vector_size_t numSpillInputs = 0;
for (auto rowIdx = 0; rowIdx < numInput; ++rowIdx) {
const auto partition = spillPartitions_[rowIdx];
if (FOLLY_UNLIKELY(!activeRows_.isValid(rowIdx))) {
for (auto row = 0; row < numInput; ++row) {
const auto partition = spillPartitions_[row];
if (FOLLY_UNLIKELY(!activeRows_.isValid(row))) {
continue;
}
if (!spiller_->isSpilled(partition)) {
continue;
}
activeRows_.setValid(rowIdx, false);
activeRows_.setValid(row, false);
++numSpillInputs;
rawSpillInputIndicesBuffers_[partition][numSpillInputs_[partition]++] =
rowIdx;
rawSpillInputIndicesBuffers_[partition][numSpillInputs_[partition]++] = row;
}
if (numSpillInputs == 0) {
return;
Expand Down
Loading

0 comments on commit d7789eb

Please sign in to comment.