MCPcopy Create free account
hub / github.com/apache/arrow / InitLocalStateIfNeeded

Method InitLocalStateIfNeeded

cpp/src/arrow/acero/hash_join.cc:109–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 }
108
109 Status InitLocalStateIfNeeded(size_t thread_index) {
110 DCHECK_LT(thread_index, local_states_.size());
111 ThreadLocalState& local_state = local_states_[thread_index];
112 if (!local_state.is_initialized) {
113 InitEncoder(0, HashJoinProjection::KEY, &local_state.exec_batch_keys);
114 bool has_payload = (schema_[0]->num_cols(HashJoinProjection::PAYLOAD) > 0);
115 if (has_payload) {
116 InitEncoder(0, HashJoinProjection::PAYLOAD, &local_state.exec_batch_payloads);
117 }
118 local_state.is_initialized = true;
119 }
120 return Status::OK();
121 }
122
123 Status EncodeBatch(int side, HashJoinProjection projection_handle, RowEncoder* encoder,
124 const ExecBatch& batch, ExecBatch* opt_projected_batch = nullptr) {

Callers

nothing calls this directly

Calls 3

num_colsMethod · 0.80
OKFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected