| 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, |