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

Method OutputNullAwareNullProbe

be/src/exec/partitioned-hash-join-node.cc:836–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

834}
835
836Status PartitionedHashJoinNode::OutputNullAwareNullProbe(
837 RuntimeState* state, RowBatch* out_batch, bool* done) {
838 DCHECK_ENUM_EQ(probe_state_, ProbeState::OUTPUTTING_NULL_PROBE);
839 DCHECK(null_aware_probe_partition_ != nullptr);
840 DCHECK_NE(probe_batch_pos_, -1);
841 *done = false;
842
843 if (probe_batch_pos_ == probe_batch_->num_rows()) {
844 probe_batch_pos_ = 0;
845 probe_batch_->TransferResourceOwnership(out_batch);
846 if (out_batch->AtCapacity()) return Status::OK();
847 bool eos;
848 RETURN_IF_ERROR(null_probe_rows_->GetNext(probe_batch_.get(), &eos));
849 if (probe_batch_->num_rows() == 0 && eos) {
850 // All done outputting rows from null-aware partition. Clean everything up.
851 null_aware_probe_partition_->Close(out_batch);
852 null_aware_probe_partition_.reset();
853 // Flush out the resources to free up memory.
854 null_probe_rows_->Close(out_batch, RowBatch::FlushMode::FLUSH_RESOURCES);
855 null_probe_rows_.reset();
856 RETURN_IF_ERROR(builder_->DoneProbingNullAwarePartition());
857 *done = true;
858 return Status::OK();
859 }
860 }
861
862 for (; probe_batch_pos_ < probe_batch_->num_rows();
863 ++probe_batch_pos_, ++null_probe_output_idx_) {
864 if (out_batch->AtCapacity()) break;
865 if (matched_null_probe_[null_probe_output_idx_]) continue;
866 TupleRow* out_row = out_batch->GetRow(out_batch->AddRow());
867 out_batch->CopyRow(probe_batch_->GetRow(probe_batch_pos_), out_row);
868 out_batch->CommitLastRow();
869 }
870
871 return Status::OK();
872}
873
874Status PartitionedHashJoinNode::InitNullAwareProbePartition() {
875 null_aware_probe_partition_.reset(

Callers

nothing calls this directly

Calls 13

OKFunction · 0.85
CopyRowMethod · 0.80
CommitLastRowMethod · 0.80
getMethod · 0.65
resetMethod · 0.65
num_rowsMethod · 0.45
AtCapacityMethod · 0.45
GetNextMethod · 0.45
CloseMethod · 0.45
GetRowMethod · 0.45

Tested by

no test coverage detected