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

Method EncodeBatch

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

Source from the content-addressed store, hash-verified

121 }
122
123 Status EncodeBatch(int side, HashJoinProjection projection_handle, RowEncoder* encoder,
124 const ExecBatch& batch, ExecBatch* opt_projected_batch = nullptr) {
125 ExecBatch projected({}, batch.length);
126 int num_cols = schema_[side]->num_cols(projection_handle);
127 projected.values.resize(num_cols);
128
129 auto to_input = schema_[side]->map(projection_handle, HashJoinProjection::INPUT);
130 for (int icol = 0; icol < num_cols; ++icol) {
131 projected.values[icol] = batch.values[to_input.get(icol)];
132 }
133
134 if (opt_projected_batch) {
135 *opt_projected_batch = projected;
136 }
137
138 return encoder->EncodeAndAppend(ExecSpan(projected));
139 }
140
141 void ProbeBatch_Lookup(ThreadLocalState* local_state, const RowEncoder& exec_batch_keys,
142 const std::vector<const uint8_t*>& non_null_bit_vectors,

Callers 2

ProbeSingleBatchMethod · 0.45

Calls 6

num_colsMethod · 0.80
resizeMethod · 0.80
mapMethod · 0.80
EncodeAndAppendMethod · 0.80
ExecSpanFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected