MCPcopy Create free account
hub / github.com/apache/impala / GetNextPassThrough

Method GetNextPassThrough

be/src/exec/union-node.cc:189–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189Status UnionNode::GetNextPassThrough(RuntimeState* state, RowBatch* row_batch) {
190 DCHECK(!ReachedLimit());
191 DCHECK(!IsInSubplan());
192 DCHECK_LT(child_idx_, children_.size());
193 DCHECK(IsChildPassthrough(child_idx_));
194 DCHECK(child(child_idx_)->row_desc()->LayoutEquals(*row_batch->row_desc()));
195 if (child_eos_) RETURN_IF_ERROR(child(child_idx_)->Open(state));
196 DCHECK_EQ(row_batch->num_rows(), 0);
197 RETURN_IF_ERROR(child(child_idx_)->GetNext(state, row_batch, &child_eos_));
198 if (child_eos_) {
199 // Even though the child is at eos, it's not OK to Close() it here. Once we close
200 // the child, the row batches that it produced are invalid. Marking the batch as
201 // needing a deep copy let's us safely close the child in the next GetNext() call.
202 // TODO: Remove this as part of IMPALA-4179.
203 row_batch->MarkNeedsDeepCopy();
204 to_close_child_idx_ = child_idx_;
205 ++child_idx_;
206 }
207 return Status::OK();
208}
209
210Status UnionNode::GetNextMaterialized(RuntimeState* state, RowBatch* row_batch) {
211 // Fetch from children, evaluate corresponding exprs and materialize.

Callers

nothing calls this directly

Calls 8

OKFunction · 0.85
MarkNeedsDeepCopyMethod · 0.80
sizeMethod · 0.45
LayoutEqualsMethod · 0.45
row_descMethod · 0.45
OpenMethod · 0.45
num_rowsMethod · 0.45
GetNextMethod · 0.45

Tested by

no test coverage detected