| 85 | } |
| 86 | |
| 87 | void RowNumber::addInput(RowVectorPtr input) { |
| 88 | const auto numInput = input->size(); |
| 89 | |
| 90 | if (table_) { |
| 91 | ensureInputFits(input); |
| 92 | |
| 93 | if (inputSpiller_ != nullptr) { |
| 94 | spillInput(input, pool()); |
| 95 | return; |
| 96 | } |
| 97 | |
| 98 | SelectivityVector rows(numInput); |
| 99 | table_->prepareForGroupProbe( |
| 100 | *lookup_, |
| 101 | input, |
| 102 | rows, |
| 103 | false, |
| 104 | BaseHashTable::kNoSpillInputStartPartitionBit); |
| 105 | table_->groupProbe(*lookup_); |
| 106 | |
| 107 | // Initialize new partitions with zeros. |
| 108 | for (auto i : lookup_->newGroups) { |
| 109 | setNumRows(lookup_->hits[i], 0); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | input_ = std::move(input); |
| 114 | } |
| 115 | |
| 116 | void RowNumber::addSpillInput() { |
| 117 | const auto numInput = input_->size(); |
nothing calls this directly
no test coverage detected