| 183 | } |
| 184 | |
| 185 | Status NestedLoopJoinNode::ConstructSingularBuildSide(RuntimeState* state) { |
| 186 | // Optimized path for a common subplan shape with a singular row src node on the build |
| 187 | // side that avoids expensive timers, virtual function calls, and other overhead. |
| 188 | DCHECK(IsInSubplan()); |
| 189 | DCHECK_EQ(2, num_children()); |
| 190 | DCHECK_EQ(child(1)->type(), TPlanNodeType::type::SINGULAR_ROW_SRC_NODE); |
| 191 | RowBatch* batch = builder_->GetNextEmptyBatch(); |
| 192 | bool eos; |
| 193 | RETURN_IF_ERROR(child(1)->GetNext(state, batch, &eos)); |
| 194 | DCHECK_EQ(batch->num_rows(), 1); |
| 195 | DCHECK(eos); |
| 196 | DCHECK(!batch->needs_deep_copy()); |
| 197 | builder_->AddBuildBatch(batch); |
| 198 | if (matching_build_rows_ != NULL) { |
| 199 | DCHECK_EQ(matching_build_rows_->num_bits(), 1); |
| 200 | matching_build_rows_->SetAllBits(false); |
| 201 | } |
| 202 | return Status::OK(); |
| 203 | } |
| 204 | |
| 205 | Status NestedLoopJoinNode::ResetMatchingBuildRows(RuntimeState* state, int64_t num_bits) { |
| 206 | // Reuse existing bitmap, expanding it if needed. |
nothing calls this directly
no test coverage detected